Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -53,7 +53,7 @@ def chat_with_bots(user_input):
|
|
53 |
bot_names = list(chatbots.keys())
|
54 |
random.shuffle(bot_names)
|
55 |
bot1_url, bot2_url = chatbots[bot_names[0]], chatbots[bot_names[1]]
|
56 |
-
|
57 |
bot1_response = get_bot_response(bot1_url, user_input)
|
58 |
bot2_response = get_bot_response(bot2_url, user_input)
|
59 |
|
@@ -87,10 +87,7 @@ def user_ask(state, chatbot1, chatbot2, textbox, upvote_btn_a, upvote_btn_b):
|
|
87 |
chatbot1.append("Bot 1: " + bot1_response)
|
88 |
|
89 |
chatbot2.append("User: " + user_input)
|
90 |
-
chatbot2.append("Bot 2: " + bot2_response)
|
91 |
-
|
92 |
-
state['last_bots'] = [bot1_response['model_name'], bot2_response['model_name']]
|
93 |
-
|
94 |
# Enable voting buttons
|
95 |
upvote_btn_a.interactive = True
|
96 |
upvote_btn_b.interactive = True
|
|
|
53 |
bot_names = list(chatbots.keys())
|
54 |
random.shuffle(bot_names)
|
55 |
bot1_url, bot2_url = chatbots[bot_names[0]], chatbots[bot_names[1]]
|
56 |
+
state['last_bots'] = [bot_names[0], bot_names[1]]
|
57 |
bot1_response = get_bot_response(bot1_url, user_input)
|
58 |
bot2_response = get_bot_response(bot2_url, user_input)
|
59 |
|
|
|
87 |
chatbot1.append("Bot 1: " + bot1_response)
|
88 |
|
89 |
chatbot2.append("User: " + user_input)
|
90 |
+
chatbot2.append("Bot 2: " + bot2_response)
|
|
|
|
|
|
|
91 |
# Enable voting buttons
|
92 |
upvote_btn_a.interactive = True
|
93 |
upvote_btn_b.interactive = True
|