Li commited on
Commit
1bddbe2
·
1 Parent(s): ab6ff71

update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -170,7 +170,10 @@ with gr.Blocks() as demo:
170
 
171
  with gr.Tab("🦓 Grounding"):
172
  with gr.Row():
173
- query_image = gr.Image(type="pil")
 
 
 
174
  with gr.Row():
175
  chat_input = gr.Textbox(lines=1, label="Chat Input")
176
  text_output = gr.Textbox(value="Output:", label="Model output")
@@ -178,10 +181,10 @@ with gr.Blocks() as demo:
178
  run_btn = gr.Button("Run model")
179
 
180
 
 
181
 
182
- def on_click_fn(img,text): return generate(0, img, text)
183
 
184
- run_btn.click(on_click_fn, inputs=[query_image,chat_input], outputs=[text_output])
185
 
186
  with gr.Tab("🔢 Counting objects"):
187
  with gr.Row():
 
170
 
171
  with gr.Tab("🦓 Grounding"):
172
  with gr.Row():
173
+ with gr.Column(scale=1):
174
+ query_image = gr.Image(type="pil")
175
+ with gr.Column(scale=1):
176
+ out_image = gr.Image(type="pil")
177
  with gr.Row():
178
  chat_input = gr.Textbox(lines=1, label="Chat Input")
179
  text_output = gr.Textbox(value="Output:", label="Model output")
 
181
  run_btn = gr.Button("Run model")
182
 
183
 
184
+ def on_click_fn(img, text): return generate(1, img, text)
185
 
 
186
 
187
+ run_btn.click(on_click_fn, inputs=[query_image, chat_input], outputs=[text_output, out_image])
188
 
189
  with gr.Tab("🔢 Counting objects"):
190
  with gr.Row():