Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -118,10 +118,10 @@ async def get_bot_response(adapter_id, prompt, state, bot_index):
|
|
118 |
response_data = await response.json()
|
119 |
response_text = response_data.get('generated_text', '')
|
120 |
else:
|
121 |
-
print(response.
|
122 |
response_text = "Sorry, I couldn't generate a response."
|
123 |
except (aiohttp.ClientError, asyncio.TimeoutError):
|
124 |
-
response_text = "Sorry, I couldn't generate a response."
|
125 |
return response_text.split('### Instruction')[0]
|
126 |
async def chat_with_bots(user_input, state):
|
127 |
# Use existing bot order from state if available, otherwise shuffle and initialize
|
|
|
118 |
response_data = await response.json()
|
119 |
response_text = response_data.get('generated_text', '')
|
120 |
else:
|
121 |
+
print(response.text)
|
122 |
response_text = "Sorry, I couldn't generate a response."
|
123 |
except (aiohttp.ClientError, asyncio.TimeoutError):
|
124 |
+
response_text = "Sorry, I couldn't generate a response. Timeout"
|
125 |
return response_text.split('### Instruction')[0]
|
126 |
async def chat_with_bots(user_input, state):
|
127 |
# Use existing bot order from state if available, otherwise shuffle and initialize
|