PierreJousselin commited on
Commit
bbd2c3b
·
verified ·
1 Parent(s): 779d72c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
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