rdezwart commited on
Commit
4d495ce
·
1 Parent(s): e2ae5eb

Adjust gallery and rename yolos_button

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -93,11 +93,12 @@ if __name__ == "__main__":
93
  with gr.Row():
94
  with gr.Column():
95
  yolos_input = gr.Image(type="pil")
96
- yolos_button = gr.Button("Submit")
 
 
97
 
98
- yolos_output = gr.Gallery(label="Detected Objects", object_fit="scale-down", columns=3, scale=1,
99
- show_share_button=False)
100
- yolos_selected = gr.Number(label="Selected Image Index")
101
 
102
  with gr.Tab("Inference"):
103
  with gr.Row():
@@ -108,7 +109,7 @@ if __name__ == "__main__":
108
  moon_output = gr.TextArea(label="Output")
109
 
110
  # --- YOLOS --- #
111
- yolos_button.click(detect_objects, [yolos_input], yolos_output)
112
  yolos_output.select(get_selected_index, None, yolos_selected)
113
 
114
  # --- Moondream --- #
 
93
  with gr.Row():
94
  with gr.Column():
95
  yolos_input = gr.Image(type="pil")
96
+ yolos_submit = gr.Button("Submit")
97
+ yolos_output = gr.Gallery(label="Detected Objects", object_fit="scale-down", columns=3, scale=2,
98
+ show_share_button=False, allow_preview=False, selected_index=None)
99
 
100
+ with gr.Row():
101
+ yolos_selected = gr.Number(label="Selected Image Index")
 
102
 
103
  with gr.Tab("Inference"):
104
  with gr.Row():
 
109
  moon_output = gr.TextArea(label="Output")
110
 
111
  # --- YOLOS --- #
112
+ yolos_submit.click(detect_objects, [yolos_input], yolos_output)
113
  yolos_output.select(get_selected_index, None, yolos_selected)
114
 
115
  # --- Moondream --- #