rwitz commited on
Commit
5619ea2
·
verified ·
1 Parent(s): a9b4582

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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.json())
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