Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ def generate_paragraph(prompt):
|
|
27 |
input_ids = tokenizer_1.encode(prompt, return_tensors="pt")
|
28 |
|
29 |
# Generate the paragraph
|
30 |
-
output = model_2.generate(input_ids, max_length=200, num_return_sequences=1, early_stopping=True)
|
31 |
|
32 |
# Decode the generated output into text
|
33 |
paragraph = tokenizer_1.decode(output[0], skip_special_tokens=True)
|
|
|
27 |
input_ids = tokenizer_1.encode(prompt, return_tensors="pt")
|
28 |
|
29 |
# Generate the paragraph
|
30 |
+
output = model_2.generate(input_ids, max_length=200, num_return_sequences=1, no_repeat_ngram_size=2, early_stopping=True)
|
31 |
|
32 |
# Decode the generated output into text
|
33 |
paragraph = tokenizer_1.decode(output[0], skip_special_tokens=True)
|