Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -111,14 +111,12 @@ def chat_with_bots(user_input, state):
|
|
111 |
return bot1_response, bot2_response
|
112 |
def update_ratings(state, winner_index):
|
113 |
elo_ratings = get_user_elo_ratings()
|
114 |
-
bot_names = list(chatbots.keys())
|
115 |
winner = state['last_bots'][winner_index]
|
116 |
loser = state['last_bots'][1 - winner_index]
|
117 |
|
118 |
elo_ratings = update_elo_ratings(elo_ratings, winner, loser)
|
119 |
-
update_elo_rating(elo_ratings,winner,loser)
|
120 |
-
return [('Winner: ',
|
121 |
-
|
122 |
def vote_up_model(state, chatbot,chatbot2):
|
123 |
update_message = update_ratings(state, 0)
|
124 |
chatbot.append(update_message[0])
|
|
|
111 |
return bot1_response, bot2_response
|
112 |
def update_ratings(state, winner_index):
|
113 |
elo_ratings = get_user_elo_ratings()
|
|
|
114 |
winner = state['last_bots'][winner_index]
|
115 |
loser = state['last_bots'][1 - winner_index]
|
116 |
|
117 |
elo_ratings = update_elo_ratings(elo_ratings, winner, loser)
|
118 |
+
update_elo_rating(elo_ratings, winner, loser)
|
119 |
+
return [('Winner: ', winner), ('Loser: ', loser)]
|
|
|
120 |
def vote_up_model(state, chatbot,chatbot2):
|
121 |
update_message = update_ratings(state, 0)
|
122 |
chatbot.append(update_message[0])
|