Update app.py
Browse files
app.py
CHANGED
@@ -53,7 +53,7 @@ def chat(history, system_message, max_tokens, temperature, top_p, top_k, repetit
|
|
53 |
repetition_penalty=repetition_penalty,
|
54 |
)
|
55 |
for tokens in prediction:
|
56 |
-
tokens = re.findall(r'\s
|
57 |
for s in tokens:
|
58 |
answer = s
|
59 |
history[-1][1] += answer
|
|
|
53 |
repetition_penalty=repetition_penalty,
|
54 |
)
|
55 |
for tokens in prediction:
|
56 |
+
tokens = re.findall(r'(.*?)(\s|$)', tokens)
|
57 |
for s in tokens:
|
58 |
answer = s
|
59 |
history[-1][1] += answer
|