Spaces:
Sleeping
Sleeping
PierreJousselin
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -19,6 +19,7 @@ def generate_text(prompt):
|
|
19 |
top_p=0.9, # Nucleus sampling (controls diversity)
|
20 |
top_k=50, # Top-k sampling (limits the number of next word candidates)
|
21 |
no_repeat_ngram_size=2, # Avoid repeating n-grams
|
|
|
22 |
)
|
23 |
|
24 |
# Decode the generated text
|
|
|
19 |
top_p=0.9, # Nucleus sampling (controls diversity)
|
20 |
top_k=50, # Top-k sampling (limits the number of next word candidates)
|
21 |
no_repeat_ngram_size=2, # Avoid repeating n-grams
|
22 |
+
pad_token_id=tokenizer.eos_token_id
|
23 |
)
|
24 |
|
25 |
# Decode the generated text
|