Spaces:
Runtime error
Runtime error
ghosthamlet
commited on
Commit
•
f333bc0
1
Parent(s):
20a3e95
Update app.py
Browse files
app.py
CHANGED
@@ -47,7 +47,8 @@ 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 |
-
|
|
|
51 |
|
52 |
if 0:
|
53 |
if len(generated_txt) == 0 :
|
|
|
47 |
else:
|
48 |
final_solution = solution
|
49 |
|
50 |
+
prompt_sep = ' @@@ '
|
51 |
+
final_solution = prompt[:max(0, len(prompt) - max_prompt_len)].replace(prompt_sep, '') + prompt_sep + final_solution.replace(prompt_sep, '')
|
52 |
|
53 |
if 0:
|
54 |
if len(generated_txt) == 0 :
|