xu song
commited on
Commit
•
87559b7
1
Parent(s):
da4f85c
update
Browse files
app.py
CHANGED
@@ -81,10 +81,7 @@ def generate_query(chatbot, history):
|
|
81 |
else:
|
82 |
chatbot.append(None)
|
83 |
streamer = bot.generate_query(history, stream=True)
|
84 |
-
query
|
85 |
-
for new_text in streamer:
|
86 |
-
print(new_text)
|
87 |
-
query += new_text
|
88 |
chatbot[-1] = (query, None)
|
89 |
yield query, chatbot, history
|
90 |
|
@@ -110,10 +107,7 @@ def generate_response(query, chatbot, history):
|
|
110 |
yield chatbot, history
|
111 |
else:
|
112 |
streamer = bot.generate_response(history, stream=True)
|
113 |
-
response
|
114 |
-
for new_text in streamer:
|
115 |
-
print(new_text)
|
116 |
-
response += new_text
|
117 |
chatbot[-1] = (query, response)
|
118 |
yield chatbot, history
|
119 |
|
|
|
81 |
else:
|
82 |
chatbot.append(None)
|
83 |
streamer = bot.generate_query(history, stream=True)
|
84 |
+
for query in streamer:
|
|
|
|
|
|
|
85 |
chatbot[-1] = (query, None)
|
86 |
yield query, chatbot, history
|
87 |
|
|
|
107 |
yield chatbot, history
|
108 |
else:
|
109 |
streamer = bot.generate_response(history, stream=True)
|
110 |
+
for response in streamer:
|
|
|
|
|
|
|
111 |
chatbot[-1] = (query, response)
|
112 |
yield chatbot, history
|
113 |
|