s3nh commited on
Commit
2e4755e
β€’
1 Parent(s): 7f816fb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -26
app.py CHANGED
@@ -65,35 +65,35 @@ with gr.Blocks(title='Asking questions about imagesπŸš€') as demo:
65
  inputs=[image1, textbox],
66
  )
67
 
68
- # with gr.Column(scale=7):
69
- # #chatbot = gr.Chatbot(label="MoE-LLaVA", bubble_full_width=True).style(height=750)
70
- # with gr.Row():
71
- # with gr.Column(scale=8):
72
- # textbox.render()
73
- # with gr.Column(scale=1, min_width=50):
74
- # submit_btn = gr.Button(
75
- # value="Send", variant="primary", interactive=True
76
- # )
77
- # with gr.Row(elem_id="buttons") as button_row:
78
- # upvote_btn = gr.Button(value="πŸ‘ Upvote", interactive=True)
79
- # downvote_btn = gr.Button(value="πŸ‘Ž Downvote", interactive=True)
80
- # flag_btn = gr.Button(value="⚠️ Flag", interactive=True)
81
- # # stop_btn = gr.Button(value="⏹️ Stop Generation", interactive=False)
82
- # regenerate_btn = gr.Button(value="πŸ”„ Regenerate", interactive=True)
83
- # clear_btn = gr.Button(value="πŸ—‘οΈ Clear history", interactive=True)
84
 
85
- # gr.Markdown(tos_markdown)
86
- # gr.Markdown(learn_more_markdown)
87
 
88
- # submit_btn.click(generate, [image1, textbox, first_run, state, state_, images_tensor],
89
- # [state, state_, chatbot, first_run, textbox, images_tensor, image1])
90
 
91
- # regenerate_btn.click(regenerate, [state, state_], [state, state_, chatbot, first_run]).then(
92
- # generate, [image1, textbox, first_run, state, state_, images_tensor],
93
- # [state, state_, chatbot, first_run, textbox, images_tensor, image1])
94
 
95
- # clear_btn.click(clear_history, [state, state_],
96
- # [image1, textbox, first_run, state, state_, chatbot, images_tensor])
97
 
98
- # app = gr.mount_gradio_app(app, demo, path="/")
99
  demo.launch()
 
65
  inputs=[image1, textbox],
66
  )
67
 
68
+ with gr.Column(scale=7):
69
+ #chatbot = gr.Chatbot(label="MoE-LLaVA", bubble_full_width=True).style(height=750)
70
+ with gr.Row():
71
+ with gr.Column(scale=8):
72
+ textbox.render()
73
+ with gr.Column(scale=1, min_width=50):
74
+ submit_btn = gr.Button(
75
+ value="Send", variant="primary", interactive=True
76
+ )
77
+ with gr.Row(elem_id="buttons") as button_row:
78
+ upvote_btn = gr.Button(value="πŸ‘ Upvote", interactive=True)
79
+ downvote_btn = gr.Button(value="πŸ‘Ž Downvote", interactive=True)
80
+ flag_btn = gr.Button(value="⚠️ Flag", interactive=True)
81
+ # stop_btn = gr.Button(value="⏹️ Stop Generation", interactive=False)
82
+ regenerate_btn = gr.Button(value="πŸ”„ Regenerate", interactive=True)
83
+ clear_btn = gr.Button(value="πŸ—‘οΈ Clear history", interactive=True)
84
 
85
+ gr.Markdown(tos_markdown)
86
+ gr.Markdown(learn_more_markdown)
87
 
88
+ #submit_btn.click(generate, [image1, textbox, first_run, state, state_, images_tensor],
89
+ # [state, state_, chatbot, first_run, textbox, images_tensor, image1])
90
 
91
+ regenerate_btn.click(regenerate, [state, state_], [state, state_, chatbot, first_run]).then(
92
+ generate, [image1, textbox, first_run, state, state_, images_tensor],
93
+ [state, state_, chatbot, first_run, textbox, images_tensor, image1])
94
 
95
+ clear_btn.click(clear_history, [state, state_],
96
+ [image1, textbox, first_run, state, state_, chatbot, images_tensor])
97
 
98
+ app = gr.mount_gradio_app(app, demo, path="/")
99
  demo.launch()