Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -220,16 +220,10 @@ def _launch_demo(args):
|
|
| 220 |
temperature=0.7,
|
| 221 |
top_p=1.0,
|
| 222 |
)
|
|
|
|
| 223 |
for response in responses:
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
response = response.output.choices[0].message.content
|
| 227 |
-
response_text = []
|
| 228 |
-
for ele in response:
|
| 229 |
-
if 'text' in ele:
|
| 230 |
-
response_text.append(ele['text'])
|
| 231 |
-
elif 'box' in ele:
|
| 232 |
-
response_text.append(ele['box'])
|
| 233 |
response_text = ''.join(response_text)
|
| 234 |
_chatbot[-1] = (_parse_text(chat_query), _remove_image_special(response_text))
|
| 235 |
yield _chatbot
|
|
|
|
| 220 |
temperature=0.7,
|
| 221 |
top_p=1.0,
|
| 222 |
)
|
| 223 |
+
response_text = []
|
| 224 |
for response in responses:
|
| 225 |
+
response_text.append(response.choices[0].delta.content)
|
| 226 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 227 |
response_text = ''.join(response_text)
|
| 228 |
_chatbot[-1] = (_parse_text(chat_query), _remove_image_special(response_text))
|
| 229 |
yield _chatbot
|