rwitz commited on
Commit
de1d1bb
β€’
1 Parent(s): 5170342

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
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=500)
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=500)
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) collection = init_database()
 
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])