Update app.py
Browse files
app.py
CHANGED
@@ -53,8 +53,8 @@ def chat(history, system_message, max_tokens, temperature, top_p, top_k, repetit
|
|
53 |
for subtoken in tokens:
|
54 |
subtoken = "".join(subtoken)
|
55 |
# Remove "Response\n" if it's at the beginning of the assistant's output
|
56 |
-
if subtoken.startswith("Response
|
57 |
-
subtoken = subtoken[len("Response
|
58 |
answer = subtoken
|
59 |
history[-1][1] += answer
|
60 |
# stream the response
|
|
|
53 |
for subtoken in tokens:
|
54 |
subtoken = "".join(subtoken)
|
55 |
# Remove "Response\n" if it's at the beginning of the assistant's output
|
56 |
+
if subtoken.startswith("Response"):
|
57 |
+
subtoken = subtoken[len("Response"):]
|
58 |
answer = subtoken
|
59 |
history[-1][1] += answer
|
60 |
# stream the response
|