IST199655
commited on
Commit
·
699de73
1
Parent(s):
9213095
app.py
CHANGED
@@ -124,7 +124,9 @@ def respond(
|
|
124 |
response = ""
|
125 |
for token in streamer:
|
126 |
response += token
|
127 |
-
|
|
|
|
|
128 |
|
129 |
|
130 |
"""
|
|
|
124 |
response = ""
|
125 |
for token in streamer:
|
126 |
response += token
|
127 |
+
if "[Chatbot]:" in response: # Only stream the part after "[Chatbot]:"
|
128 |
+
assistant_response = response.split("[Chatbot]:", 1)[1].strip()
|
129 |
+
yield assistant_response
|
130 |
|
131 |
|
132 |
"""
|