Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
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)
|