Spaces:
Build error
Build error
update
Browse files
app.py
CHANGED
|
@@ -71,7 +71,8 @@ def predict(inputs, chatbot):
|
|
| 71 |
for chunk in response:
|
| 72 |
if len(chunk['choices'][0]['delta']) != 0:
|
| 73 |
print(chunk['choices'][0]['delta']['content'])
|
| 74 |
-
|
|
|
|
| 75 |
#time.sleep(0.5)
|
| 76 |
|
| 77 |
def echo_stream(message, history):
|
|
|
|
| 71 |
for chunk in response:
|
| 72 |
if len(chunk['choices'][0]['delta']) != 0:
|
| 73 |
print(chunk['choices'][0]['delta']['content'])
|
| 74 |
+
partial_message = partial_message + chunk['choices'][0]['delta']['content']
|
| 75 |
+
yield partial_message
|
| 76 |
#time.sleep(0.5)
|
| 77 |
|
| 78 |
def echo_stream(message, history):
|