Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -99,7 +99,7 @@ def user_ask(state, chatbot1, chatbot2, textbox, upvote_btn_a, upvote_btn_b):
|
|
99 |
# Enable voting buttons
|
100 |
upvote_btn_a.interactive = True
|
101 |
upvote_btn_b.interactive = True
|
102 |
-
|
103 |
return state, chatbot1, chatbot2, "", upvote_btn_a, upvote_btn_b
|
104 |
|
105 |
# ... [Rest of your existing functions] ...
|
@@ -124,8 +124,8 @@ with gr.Blocks() as demo:
|
|
124 |
submit_btn = gr.Button(value="Send")
|
125 |
|
126 |
# Interaction logic
|
127 |
-
textbox.submit(user_ask, [state, chatbot1, chatbot2, textbox,upvote_btn_a, upvote_btn_b], [state, chatbot1, chatbot2, textbox])
|
128 |
-
submit_btn.click(user_ask, [state, chatbot1, chatbot2, textbox,upvote_btn_a, upvote_btn_b], [state, chatbot1, chatbot2, textbox])
|
129 |
upvote_btn_a.click(vote_up_model, [state, chatbot1], [chatbot1])
|
130 |
upvote_btn_b.click(vote_up_model, [state, chatbot2], [chatbot2])
|
131 |
|
|
|
99 |
# Enable voting buttons
|
100 |
upvote_btn_a.interactive = True
|
101 |
upvote_btn_b.interactive = True
|
102 |
+
print(state, chatbot1, chatbot2, "", upvote_btn_a, upvote_btn_b)
|
103 |
return state, chatbot1, chatbot2, "", upvote_btn_a, upvote_btn_b
|
104 |
|
105 |
# ... [Rest of your existing functions] ...
|
|
|
124 |
submit_btn = gr.Button(value="Send")
|
125 |
|
126 |
# Interaction logic
|
127 |
+
textbox.submit(user_ask, [state, chatbot1, chatbot2, textbox,upvote_btn_a, upvote_btn_b], [state, chatbot1, chatbot2, textbox,upvote_btn_a, upvote_btn_b])
|
128 |
+
submit_btn.click(user_ask, [state, chatbot1, chatbot2, textbox,upvote_btn_a, upvote_btn_b], [state, chatbot1, chatbot2, textbox,upvote_btn_a, upvote_btn_b])
|
129 |
upvote_btn_a.click(vote_up_model, [state, chatbot1], [chatbot1])
|
130 |
upvote_btn_b.click(vote_up_model, [state, chatbot2], [chatbot2])
|
131 |
|