Spaces:
Sleeping
Sleeping
0.63 implemented vote
Browse files
app.py
CHANGED
@@ -278,6 +278,16 @@ def handle_vote(selection, chatbot_a, chatbot_b):
|
|
278 |
chatbot_a_vote = "draw"
|
279 |
chatbot_b_vote = "draw"
|
280 |
logging.debug(f'Casting vote: {chatbot_a_name}: {chatbot_a_vote}, {chatbot_b_name}: {chatbot_b_vote}')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
return chatbot_a, chatbot_b
|
282 |
|
283 |
with gr.Blocks() as demo:
|
|
|
278 |
chatbot_a_vote = "draw"
|
279 |
chatbot_b_vote = "draw"
|
280 |
logging.debug(f'Casting vote: {chatbot_a_name}: {chatbot_a_vote}, {chatbot_b_name}: {chatbot_b_vote}')
|
281 |
+
|
282 |
+
try:
|
283 |
+
# chatbot_a[-1][1] Second index of last in list
|
284 |
+
sheet_row = ["None", "None", 0, 0, 0, 0, chatbot_a_name, "None", chatbot_b_name, "None", chatbot_a_vote, chatbot_b_vote]
|
285 |
+
logging.debug(f'{SPACER}\nOutput row: {sheet_row}')
|
286 |
+
sheet = get_google_sheet()
|
287 |
+
sheet.append_row(sheet_row, table_range="A1:L1")
|
288 |
+
except Exception as e:
|
289 |
+
logging.error(f'{SPACER} Error: {e}, Traceback {traceback.format_exc()}')
|
290 |
+
|
291 |
return chatbot_a, chatbot_b
|
292 |
|
293 |
with gr.Blocks() as demo:
|