Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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
|
|
|
|
| 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)
|