Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -76,9 +76,10 @@ def respond(message, history, system_message, max_tokens, temperature, top_p):
|
|
76 |
temperature=temperature,
|
77 |
top_p=top_p,
|
78 |
):
|
79 |
-
|
80 |
-
|
81 |
-
|
|
|
82 |
|
83 |
demo = gr.ChatInterface(
|
84 |
respond,
|
|
|
76 |
temperature=temperature,
|
77 |
top_p=top_p,
|
78 |
):
|
79 |
+
if message.choices and message.choices[0].delta and message.choices[0].delta.content:
|
80 |
+
token = message.choices[0].delta.content
|
81 |
+
response += token
|
82 |
+
yield response
|
83 |
|
84 |
demo = gr.ChatInterface(
|
85 |
respond,
|