Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -72,7 +72,6 @@ def generate(prompt, history,max_new_tokens,temperature=temperature,top_p=top_p,
|
|
72 |
for response in stream:
|
73 |
output += response.token.text
|
74 |
if history:
|
75 |
-
print (history)
|
76 |
yield "",[(prompt,output)]
|
77 |
else:
|
78 |
yield "",[(prompt,output)]
|
@@ -92,7 +91,8 @@ def generate(prompt, history,max_new_tokens,temperature=temperature,top_p=top_p,
|
|
92 |
print(line)
|
93 |
|
94 |
if history:
|
95 |
-
|
|
|
96 |
else:
|
97 |
return "",[(prompt,output)]
|
98 |
|
|
|
72 |
for response in stream:
|
73 |
output += response.token.text
|
74 |
if history:
|
|
|
75 |
yield "",[(prompt,output)]
|
76 |
else:
|
77 |
yield "",[(prompt,output)]
|
|
|
91 |
print(line)
|
92 |
|
93 |
if history:
|
94 |
+
history.append((prompt,output))
|
95 |
+
return "",history
|
96 |
else:
|
97 |
return "",[(prompt,output)]
|
98 |
|