Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -82,7 +82,8 @@ def paraphrase(sentence: str, count: str):
|
|
82 |
return {'result': []}
|
83 |
sentence_input = sentence
|
84 |
text = f"paraphrase: {sentence_input} </s>"
|
85 |
-
encoding = tokenizer.encode_plus(text, padding=True, return_tensors="pt")
|
|
|
86 |
# input_ids, attention_masks = encoding["input_ids"], encoding["attention_mask"]
|
87 |
|
88 |
# outputs = model.generate(
|
|
|
82 |
return {'result': []}
|
83 |
sentence_input = sentence
|
84 |
text = f"paraphrase: {sentence_input} </s>"
|
85 |
+
# encoding = tokenizer.encode_plus(text, padding=True, return_tensors="pt")
|
86 |
+
encoding = tokenizer(text, return_tensors="pt")
|
87 |
# input_ids, attention_masks = encoding["input_ids"], encoding["attention_mask"]
|
88 |
|
89 |
# outputs = model.generate(
|