Spaces:
Runtime error
Runtime error
Commit
·
2d60535
1
Parent(s):
1b3265e
Update app.py
Browse files
app.py
CHANGED
|
@@ -47,7 +47,7 @@ def text_generate(prompt, top_p=0.8, top_k=100, temperature=1.0, num_beams=3, re
|
|
| 47 |
else:
|
| 48 |
final_solution = solution
|
| 49 |
|
| 50 |
-
final_solution = prompt[:max_prompt_len] + final_solution
|
| 51 |
|
| 52 |
if 0:
|
| 53 |
if len(generated_txt) == 0 :
|
|
|
|
| 47 |
else:
|
| 48 |
final_solution = solution
|
| 49 |
|
| 50 |
+
final_solution = prompt[:max(0, len(prompt) - max_prompt_len)] + final_solution
|
| 51 |
|
| 52 |
if 0:
|
| 53 |
if len(generated_txt) == 0 :
|