Update app.py
Browse files
app.py
CHANGED
|
@@ -54,8 +54,9 @@ def chat(history, system_message, max_tokens, temperature, top_p, top_k, repetit
|
|
| 54 |
)
|
| 55 |
for tokens in prediction:
|
| 56 |
tokens = re.findall(r'(.*?)(\s|$)', tokens)
|
| 57 |
-
for
|
| 58 |
-
|
|
|
|
| 59 |
history[-1][1] += answer
|
| 60 |
# stream the response
|
| 61 |
yield history, history, ""
|
|
|
|
| 54 |
)
|
| 55 |
for tokens in prediction:
|
| 56 |
tokens = re.findall(r'(.*?)(\s|$)', tokens)
|
| 57 |
+
for subtoken in tokens:
|
| 58 |
+
subtoken = "".join(subtoken)
|
| 59 |
+
answer = subtoken
|
| 60 |
history[-1][1] += answer
|
| 61 |
# stream the response
|
| 62 |
yield history, history, ""
|