rwitz commited on
Commit
c0e1a51
Β·
1 Parent(s): 1f1eb09

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -6
app.py CHANGED
@@ -98,19 +98,26 @@ with gr.Blocks() as demo:
98
 
99
  with gr.Row():
100
  with gr.Column(scale=0.5):
 
 
 
 
 
 
 
101
  chatbot = gr.Chatbot(label='ChatBox')
102
  with gr.Row():
103
- textbox = gr.Textbox(placeholder="Enter text and press ENTER")
104
- submit_btn = gr.Button(value="Submit")
105
- with gr.Column():
106
- upvote_btn = gr.Button(value="πŸ‘ Upvote Bot 1")
107
- downvote_btn = gr.Button(value="πŸ‘Ž Upvote Bot 2")
108
- clear_btn = gr.Button(value="πŸ—‘οΈ Clear Chat")
109
 
110
  textbox.submit(user_ask, [state, chatbot, textbox], [state, chatbot, textbox])
111
  submit_btn.click(user_ask, [state, chatbot, textbox], [state, chatbot, textbox])
112
  upvote_btn.click(vote_up_model, [state, chatbot], [chatbot])
113
  downvote_btn.click(vote_down_model, [state, chatbot], [chatbot])
114
  clear_btn.click(lambda _: chatbot.clear(), inputs=[], outputs=[chatbot])
 
 
115
  demo.queue()
116
  demo.launch(share=True, server_name='0.0.0.0', server_port=7860)
 
98
 
99
  with gr.Row():
100
  with gr.Column(scale=0.5):
101
+ imagebox = gr.Image(type="pil")
102
+ with gr.Row() as button_row:
103
+ upvote_btn = gr.Button(value="πŸ‘ Upvote", interactive=False)
104
+ downvote_btn = gr.Button(value="πŸ‘Ž Downvote", interactive=False)
105
+ tie_btn = gr.Button(value="🀝 Tie", interactive=False)
106
+ clear_btn = gr.Button(value="πŸ—‘οΈ Clear", interactive=False)
107
+ with gr.Column():
108
  chatbot = gr.Chatbot(label='ChatBox')
109
  with gr.Row():
110
+ with gr.Column(scale=8):
111
+ textbox = gr.Textbox(placeholder="Enter text and press ENTER")
112
+ with gr.Column(scale=1, min_width=60):
113
+ submit_btn = gr.Button(value="Submit")
 
 
114
 
115
  textbox.submit(user_ask, [state, chatbot, textbox], [state, chatbot, textbox])
116
  submit_btn.click(user_ask, [state, chatbot, textbox], [state, chatbot, textbox])
117
  upvote_btn.click(vote_up_model, [state, chatbot], [chatbot])
118
  downvote_btn.click(vote_down_model, [state, chatbot], [chatbot])
119
  clear_btn.click(lambda _: chatbot.clear(), inputs=[], outputs=[chatbot])
120
+
121
+
122
  demo.queue()
123
  demo.launch(share=True, server_name='0.0.0.0', server_port=7860)