Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -33,7 +33,7 @@ def respond(
|
|
33 |
# Adding the current user input
|
34 |
messages.append({"role": "user", "content": message})
|
35 |
|
36 |
-
response =
|
37 |
|
38 |
# Streaming the response from the API
|
39 |
for message in client.chat_completion(
|
@@ -44,7 +44,7 @@ def respond(
|
|
44 |
top_p=top_p,
|
45 |
):
|
46 |
token = message.choices[0].delta.content
|
47 |
-
response += token
|
48 |
yield response
|
49 |
|
50 |
|
|
|
33 |
# Adding the current user input
|
34 |
messages.append({"role": "user", "content": message})
|
35 |
|
36 |
+
response = ''
|
37 |
|
38 |
# Streaming the response from the API
|
39 |
for message in client.chat_completion(
|
|
|
44 |
top_p=top_p,
|
45 |
):
|
46 |
token = message.choices[0].delta.content
|
47 |
+
response += gr.Markdown(token)
|
48 |
yield response
|
49 |
|
50 |
|