Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -251,11 +251,11 @@ with gr.Blocks() as demo:
|
|
251 |
|
252 |
with gr.Row():
|
253 |
with gr.Column():
|
254 |
-
chatbot1 = gr.Chatbot(label='π€ Model A').style(height=
|
255 |
upvote_btn_a = gr.Button(value="π Upvote A", interactive=False).style(full_width=True)
|
256 |
|
257 |
with gr.Column():
|
258 |
-
chatbot2 = gr.Chatbot(label='π€ Model B').style(height=
|
259 |
upvote_btn_b = gr.Button(value="π Upvote B", interactive=False).style(full_width=True)
|
260 |
|
261 |
with gr.Row():
|
@@ -273,7 +273,8 @@ with gr.Blocks() as demo:
|
|
273 |
# ...
|
274 |
|
275 |
reset_btn.click(clear_chat, inputs=[state], outputs=[state, chatbot1, chatbot2, upvote_btn_a, upvote_btn_b, textbox, submit_btn])
|
276 |
-
submit_btn.click(user_ask, inputs=[state, chatbot1, chatbot2, textbox, character_name, character_description], outputs=[state, chatbot1, chatbot2, textbox, upvote_btn_a, upvote_btn_b], queue=True)
|
|
|
277 |
|
278 |
upvote_btn_a.click(vote_up_model, inputs=[state, chatbot1, chatbot2], outputs=[chatbot1, chatbot2, upvote_btn_a, upvote_btn_b, textbox, submit_btn])
|
279 |
upvote_btn_b.click(vote_down_model, inputs=[state, chatbot1, chatbot2], outputs=[chatbot1, chatbot2, upvote_btn_a, upvote_btn_b, textbox, submit_btn])
|
|
|
251 |
|
252 |
with gr.Row():
|
253 |
with gr.Column():
|
254 |
+
chatbot1 = gr.Chatbot(label='π€ Model A').style(height=350)
|
255 |
upvote_btn_a = gr.Button(value="π Upvote A", interactive=False).style(full_width=True)
|
256 |
|
257 |
with gr.Column():
|
258 |
+
chatbot2 = gr.Chatbot(label='π€ Model B').style(height=350)
|
259 |
upvote_btn_b = gr.Button(value="π Upvote B", interactive=False).style(full_width=True)
|
260 |
|
261 |
with gr.Row():
|
|
|
273 |
# ...
|
274 |
|
275 |
reset_btn.click(clear_chat, inputs=[state], outputs=[state, chatbot1, chatbot2, upvote_btn_a, upvote_btn_b, textbox, submit_btn])
|
276 |
+
submit_btn.click(user_ask, inputs=[state, chatbot1, chatbot2, textbox, character_name, character_description], outputs=[state, chatbot1, chatbot2, textbox, upvote_btn_a, upvote_btn_b], queue=True)
|
277 |
+
collection = init_database()
|
278 |
|
279 |
upvote_btn_a.click(vote_up_model, inputs=[state, chatbot1, chatbot2], outputs=[chatbot1, chatbot2, upvote_btn_a, upvote_btn_b, textbox, submit_btn])
|
280 |
upvote_btn_b.click(vote_down_model, inputs=[state, chatbot1, chatbot2], outputs=[chatbot1, chatbot2, upvote_btn_a, upvote_btn_b, textbox, submit_btn])
|