Spaces:
Running
on
Zero
Running
on
Zero
root
commited on
Commit
•
135611f
1
Parent(s):
e16319b
fix streaming
Browse files
app.py
CHANGED
@@ -79,10 +79,15 @@ def ovis_chat(chatbot, image_input):
|
|
79 |
thread.start()
|
80 |
for new_text in streamer:
|
81 |
response += new_text
|
82 |
-
print(new_text)
|
83 |
chatbot[-1][1] = response
|
84 |
yield chatbot
|
85 |
thread.join()
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
|
87 |
def clear_chat():
|
88 |
return [], None, ""
|
|
|
79 |
thread.start()
|
80 |
for new_text in streamer:
|
81 |
response += new_text
|
|
|
82 |
chatbot[-1][1] = response
|
83 |
yield chatbot
|
84 |
thread.join()
|
85 |
+
# debug
|
86 |
+
print('*'*40)
|
87 |
+
for request,answer in chatbot[:-1]:
|
88 |
+
print('Q:',request,'\nA:', answer[0:100])
|
89 |
+
print('New Q:\n', text_input)
|
90 |
+
print('New A:\n', response)
|
91 |
|
92 |
def clear_chat():
|
93 |
return [], None, ""
|