Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,7 @@ def generate_text(prompt):
|
|
| 12 |
temperature=0.7, # Lower temperature for more coherent responses
|
| 13 |
top_k=50, # Limits sampling pool to the top 50 tokens
|
| 14 |
top_p=0.9, # Limits sampling to 90% cumulative probability
|
| 15 |
-
repetition_penalty=1.
|
| 16 |
do_sample=True # Enables sampling for added randomness
|
| 17 |
)[0]["generated_text"]
|
| 18 |
|
|
|
|
| 12 |
temperature=0.7, # Lower temperature for more coherent responses
|
| 13 |
top_k=50, # Limits sampling pool to the top 50 tokens
|
| 14 |
top_p=0.9, # Limits sampling to 90% cumulative probability
|
| 15 |
+
repetition_penalty=1.3, # Penalizes repeated phrases (increase if repetition continues)
|
| 16 |
do_sample=True # Enables sampling for added randomness
|
| 17 |
)[0]["generated_text"]
|
| 18 |
|