rwitz commited on
Commit
8909c53
1 Parent(s): 4a2e035

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -117,8 +117,10 @@ def chat_with_bots(user_input, state):
117
 
118
  bot1_adapter, bot2_adapter = state['last_bots'][0], state['last_bots'][1]
119
 
120
- bot1_response = get_bot_response(bot1_adapter, user_input, state, 0)
121
- bot2_response = get_bot_response(bot2_adapter, user_input, state, 1)
 
 
122
 
123
  return bot1_response, bot2_response
124
  def update_ratings(state, winner_index):
 
117
 
118
  bot1_adapter, bot2_adapter = state['last_bots'][0], state['last_bots'][1]
119
 
120
+ bot1_response, bot2_response = await asyncio.gather(
121
+ get_bot_response(bot1_adapter, user_input, state, 0),
122
+ get_bot_response(bot2_adapter, user_input, state, 1)
123
+ )
124
 
125
  return bot1_response, bot2_response
126
  def update_ratings(state, winner_index):