Spaces:
Sleeping
Sleeping
Pavithiran
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -37,15 +37,14 @@ def respond(
|
|
37 |
top_p=top_p,
|
38 |
):
|
39 |
token = message.choices[0].delta.content
|
40 |
-
print('token start')
|
41 |
print(token)
|
42 |
-
|
43 |
response += token
|
44 |
-
print('token end')
|
45 |
|
|
|
|
|
46 |
yield response.json()
|
47 |
except Exception as e:
|
48 |
-
|
49 |
"""
|
50 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
51 |
"""
|
|
|
37 |
top_p=top_p,
|
38 |
):
|
39 |
token = message.choices[0].delta.content
|
|
|
40 |
print(token)
|
|
|
41 |
response += token
|
|
|
42 |
|
43 |
+
print(response)
|
44 |
+
print(type(response))
|
45 |
yield response.json()
|
46 |
except Exception as e:
|
47 |
+
yield f"Error: {e}"
|
48 |
"""
|
49 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
50 |
"""
|