Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -109,7 +109,7 @@ def generate(prompt, history,max_new_tokens,health,temperature=temperature,top_p
|
|
| 109 |
option_drop=[]
|
| 110 |
new_stat="*******************\n"
|
| 111 |
for i,line in enumerate(lines):
|
| 112 |
-
if ":" in line:
|
| 113 |
for z in range(1,5):
|
| 114 |
try:
|
| 115 |
if f'{z}' in lines[i+z]:
|
|
@@ -139,9 +139,9 @@ def generate(prompt, history,max_new_tokens,health,temperature=temperature,top_p
|
|
| 139 |
|
| 140 |
if history:
|
| 141 |
history.append((prompt,output))
|
| 142 |
-
yield history,stats,skills,
|
| 143 |
else:
|
| 144 |
-
yield [(prompt,output)],stats,skills,
|
| 145 |
|
| 146 |
def clear_fn():
|
| 147 |
return None,None
|
|
|
|
| 109 |
option_drop=[]
|
| 110 |
new_stat="*******************\n"
|
| 111 |
for i,line in enumerate(lines):
|
| 112 |
+
if "Choices:" in line:
|
| 113 |
for z in range(1,5):
|
| 114 |
try:
|
| 115 |
if f'{z}' in lines[i+z]:
|
|
|
|
| 139 |
|
| 140 |
if history:
|
| 141 |
history.append((prompt,output))
|
| 142 |
+
yield history,stats,skills,option_drop
|
| 143 |
else:
|
| 144 |
+
yield [(prompt,output)],stats,skills,option_drop
|
| 145 |
|
| 146 |
def clear_fn():
|
| 147 |
return None,None
|