Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -108,10 +108,9 @@ def bot(history, api_kind):
|
|
| 108 |
count_tokens = lambda text: len([token.strip() for token in text.split() if token.strip()])
|
| 109 |
print(prompt_html,'token count is',count_tokens(prompt_html))
|
| 110 |
history[-1][1] = ""
|
| 111 |
-
|
| 112 |
-
|
| 113 |
# #yield history, prompt_html
|
| 114 |
-
history[-1][1] =generate_fn(prompt, history[:-1])
|
| 115 |
print('final history is ',history)
|
| 116 |
return history[-1][1], prompt_html
|
| 117 |
|
|
|
|
| 108 |
count_tokens = lambda text: len([token.strip() for token in text.split() if token.strip()])
|
| 109 |
print(prompt_html,'token count is',count_tokens(prompt_html))
|
| 110 |
history[-1][1] = ""
|
| 111 |
+
for character in generate_fn(prompt, history[:-1]):
|
| 112 |
+
history[-1][1] = character
|
| 113 |
# #yield history, prompt_html
|
|
|
|
| 114 |
print('final history is ',history)
|
| 115 |
return history[-1][1], prompt_html
|
| 116 |
|