Wootang01 commited on
Commit
8648738
·
1 Parent(s): ddcb318

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -12,7 +12,7 @@ def generate_text(inp):
12
  text = "paraphrase: "+context + " </s>"
13
  context = inp
14
  encoding = tokenizer.encode_plus(text, max_length=256, padding=True, return_tensors="pt")
15
- input_ids, attention_mask = encoding["input_ids"].to(device), encoding["attention_mask"].to(device_
16
  model.eval()
17
  diverse_beams_output = model.generate(
18
  input_ids = input_ids, attention_mask = max_length=256, early_stopping = True, num_beams = 5, num_beam_groups = 5, num_return_sequences = 5, diversity_penalty = 0,70)
 
12
  text = "paraphrase: "+context + " </s>"
13
  context = inp
14
  encoding = tokenizer.encode_plus(text, max_length=256, padding=True, return_tensors="pt")
15
+ input_ids, attention_mask = encoding["input_ids"].to(device), encoding["attention_mask"].to(device)
16
  model.eval()
17
  diverse_beams_output = model.generate(
18
  input_ids = input_ids, attention_mask = max_length=256, early_stopping = True, num_beams = 5, num_beam_groups = 5, num_return_sequences = 5, diversity_penalty = 0,70)