Aumkeshchy2003 commited on
Commit
1e2d403
·
verified ·
1 Parent(s): 3545274

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -123,11 +123,11 @@ with gr.Blocks(title="Real-Time YOLOv5 Video & Image Detection") as demo:
123
  with gr.TabItem("Image Detection"):
124
  with gr.Row():
125
  image_input = gr.Image(type="pil", label="Upload Image", width=256, height=256)
 
126
  with gr.Row():
127
- submit_button = gr.Button("Submit")
128
  clear_button = gr.Button("Clear")
129
- image_output = gr.Image(label="Detected Objects", width=256, height=256)
130
- submit_button.click(fn=process_image, inputs=image_input, outputs=image_output)
131
  clear_button.click(fn=lambda: None, inputs=None, outputs=image_output)
 
132
 
133
  demo.launch()
 
123
  with gr.TabItem("Image Detection"):
124
  with gr.Row():
125
  image_input = gr.Image(type="pil", label="Upload Image", width=256, height=256)
126
+ image_output = gr.Image(label="Detected Objects", width=256, height=256)
127
  with gr.Row():
 
128
  clear_button = gr.Button("Clear")
129
+ submit_button = gr.Button("Submit")
 
130
  clear_button.click(fn=lambda: None, inputs=None, outputs=image_output)
131
+ submit_button.click(fn=process_image, inputs=image_input, outputs=image_output)
132
 
133
  demo.launch()