Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -96,7 +96,7 @@ def user_ask(state, chatbot1, chatbot2, textbox):
|
|
96 |
|
97 |
updated_elo_ratings = get_user_elo_ratings(state)
|
98 |
state.update({'elo_ratings': updated_elo_ratings})
|
99 |
-
return state, chatbot1, chatbot2
|
100 |
|
101 |
# ... [Rest of your existing functions] ...
|
102 |
|
@@ -119,7 +119,7 @@ with gr.Blocks() as demo:
|
|
119 |
submit_btn = gr.Button(value="Send")
|
120 |
|
121 |
# Interaction logic
|
122 |
-
|
123 |
submit_btn.click(user_ask, inputs=[state, chatbot1, chatbot2, textbox], outputs=[state, chatbot1, chatbot2,textbox])
|
124 |
upvote_btn_a.click(vote_up_model, inputs=[state, chatbot1], outputs=[chatbot1])
|
125 |
upvote_btn_b.click(vote_up_model, inputs=[state, chatbot2], outputs=[chatbot2])
|
|
|
96 |
|
97 |
updated_elo_ratings = get_user_elo_ratings(state)
|
98 |
state.update({'elo_ratings': updated_elo_ratings})
|
99 |
+
return state, chatbot1, chatbot2,textbox
|
100 |
|
101 |
# ... [Rest of your existing functions] ...
|
102 |
|
|
|
119 |
submit_btn = gr.Button(value="Send")
|
120 |
|
121 |
# Interaction logic
|
122 |
+
textbox.submit(user_ask, inputs=[state, chatbot1, chatbot2, textbox], outputs=[state, chatbot1, chatbot2,textbox])
|
123 |
submit_btn.click(user_ask, inputs=[state, chatbot1, chatbot2, textbox], outputs=[state, chatbot1, chatbot2,textbox])
|
124 |
upvote_btn_a.click(vote_up_model, inputs=[state, chatbot1], outputs=[chatbot1])
|
125 |
upvote_btn_b.click(vote_up_model, inputs=[state, chatbot2], outputs=[chatbot2])
|