Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -23,7 +23,7 @@ parrot = Parrot(model_tag="prithivida/parrot_paraphraser_on_T5")
|
|
| 23 |
|
| 24 |
|
| 25 |
def paraphrase_sentence(sentence):
|
| 26 |
-
paraphrases = parrot.augment(input_phrase=sentence, max_return_phrases=
|
| 27 |
fluency_threshold=0.75)
|
| 28 |
return random.choice(paraphrases)[0] if paraphrases else sentence
|
| 29 |
|
|
|
|
| 23 |
|
| 24 |
|
| 25 |
def paraphrase_sentence(sentence):
|
| 26 |
+
paraphrases = parrot.augment(input_phrase=sentence, max_return_phrases=10, max_length=100, adequacy_threshold=0.75,
|
| 27 |
fluency_threshold=0.75)
|
| 28 |
return random.choice(paraphrases)[0] if paraphrases else sentence
|
| 29 |
|