qgyd2021 commited on
Commit
8f55dd4
1 Parent(s): ea21765

[update]edit main

Browse files
Files changed (1) hide show
  1. main.py +4 -4
main.py CHANGED
@@ -235,27 +235,27 @@ def main():
235
  with gr.Column():
236
  img_output_from_url = gr.Image()
237
 
 
 
238
  with gr.Row():
239
  gr.Examples(examples=example_urls,
240
  inputs=[url_input, model_name, threshold_slider, iou_threshold_slider],
241
  examples_per_page=5,
242
  )
243
 
244
- url_but = gr.Button("Detect")
245
-
246
  with gr.TabItem("Image Upload"):
247
  with gr.Row():
248
  img_input = gr.Image(type="pil")
249
  img_output_from_upload = gr.Image()
250
 
 
 
251
  with gr.Row():
252
  gr.Examples(examples=example_images,
253
  inputs=[img_input, model_name, threshold_slider, iou_threshold_slider],
254
  examples_per_page=5,
255
  )
256
 
257
- img_but = gr.Button("Detect")
258
-
259
  inputs = [url_input, img_input, model_name, threshold_slider, iou_threshold_slider, classes_to_detect]
260
  url_but.click(detr_object_detection, inputs=inputs, outputs=[img_output_from_url], queue=True)
261
  img_but.click(detr_object_detection, inputs=inputs, outputs=[img_output_from_upload], queue=True)
 
235
  with gr.Column():
236
  img_output_from_url = gr.Image()
237
 
238
+ url_but = gr.Button("Detect")
239
+
240
  with gr.Row():
241
  gr.Examples(examples=example_urls,
242
  inputs=[url_input, model_name, threshold_slider, iou_threshold_slider],
243
  examples_per_page=5,
244
  )
245
 
 
 
246
  with gr.TabItem("Image Upload"):
247
  with gr.Row():
248
  img_input = gr.Image(type="pil")
249
  img_output_from_upload = gr.Image()
250
 
251
+ img_but = gr.Button("Detect")
252
+
253
  with gr.Row():
254
  gr.Examples(examples=example_images,
255
  inputs=[img_input, model_name, threshold_slider, iou_threshold_slider],
256
  examples_per_page=5,
257
  )
258
 
 
 
259
  inputs = [url_input, img_input, model_name, threshold_slider, iou_threshold_slider, classes_to_detect]
260
  url_but.click(detr_object_detection, inputs=inputs, outputs=[img_output_from_url], queue=True)
261
  img_but.click(detr_object_detection, inputs=inputs, outputs=[img_output_from_upload], queue=True)