Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -37,6 +37,7 @@ def respond(
|
|
37 |
top_p=top_p,
|
38 |
):
|
39 |
token = message.choices[0].delta.content
|
|
|
40 |
|
41 |
# If the token is not a valid JSON string, yield it as is
|
42 |
try:
|
@@ -49,7 +50,7 @@ def respond(
|
|
49 |
response += token
|
50 |
yield response
|
51 |
except Exception as e:
|
52 |
-
|
53 |
"""
|
54 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
55 |
"""
|
|
|
37 |
top_p=top_p,
|
38 |
):
|
39 |
token = message.choices[0].delta.content
|
40 |
+
print(token)
|
41 |
|
42 |
# If the token is not a valid JSON string, yield it as is
|
43 |
try:
|
|
|
50 |
response += token
|
51 |
yield response
|
52 |
except Exception as e:
|
53 |
+
yield f"Error: {e}"
|
54 |
"""
|
55 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
56 |
"""
|