Update app.py
Browse files
app.py
CHANGED
@@ -33,7 +33,7 @@ def generate_text(input_text, max_length=16, num_beams=5, do_sample=False, no_re
|
|
33 |
generated_text = tokenizer.decode(output[0])
|
34 |
return generated_text
|
35 |
|
36 |
-
def generate_text_with_nucleus_search(input_text, max_length=
|
37 |
"""
|
38 |
Generate text with nucleus sampling based on the given input text.
|
39 |
|
|
|
33 |
generated_text = tokenizer.decode(output[0])
|
34 |
return generated_text
|
35 |
|
36 |
+
def generate_text_with_nucleus_search(input_text, max_length=16, do_sample=True, top_p=0.9):
|
37 |
"""
|
38 |
Generate text with nucleus sampling based on the given input text.
|
39 |
|