rwitz commited on
Commit
5b420e4
·
1 Parent(s): 5c13efa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -42,8 +42,9 @@ def get_bot_response(url, prompt):
42
  return response.json()
43
 
44
  def chat_with_bots(user_input):
45
- bot1_url = chatbots[list(chatbots.keys())[0]]
46
- bot2_url = chatbots[list(chatbots.keys())[1]]
 
47
 
48
  bot1_response = get_bot_response(bot1_url, user_input)
49
  bot2_response = get_bot_response(bot2_url, user_input)
 
42
  return response.json()
43
 
44
  def chat_with_bots(user_input):
45
+ bot1_url = chatbots[list(chatbots.keys())[random.randint(0,len(list(chatbots.keys())))]]
46
+ while bot2_url!=bot1_url:
47
+ bot2_url = chatbots[list(chatbots.keys())[random.randint(0,len(list(chatbots.keys())))]]
48
 
49
  bot1_response = get_bot_response(bot1_url, user_input)
50
  bot2_response = get_bot_response(bot2_url, user_input)