Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -124,13 +124,14 @@ with gr.Blocks(title="Real-Time YOLOv5 Video & Image Object Detection") as demo:
|
|
| 124 |
with gr.TabItem("Image Detection"):
|
| 125 |
with gr.Row():
|
| 126 |
image_input = gr.Image(type="pil", label="Upload Image", interactive=True)
|
| 127 |
-
with gr.Row():
|
| 128 |
-
image_output = gr.Image(label="Detected Objects", elem_id="image-output")
|
| 129 |
with gr.Row():
|
| 130 |
clear_button = gr.Button("Clear", variant="secondary", elem_id="clear-btn")
|
| 131 |
submit_button = gr.Button("Detect Objects", variant="primary", elem_id="submit-btn")
|
| 132 |
clear_button.click(fn=lambda: None, inputs=None, outputs=image_output)
|
| 133 |
submit_button.click(fn=process_image, inputs=image_input, outputs=image_output)
|
|
|
|
|
|
|
|
|
|
| 134 |
|
| 135 |
demo.launch()
|
| 136 |
|
|
|
|
| 124 |
with gr.TabItem("Image Detection"):
|
| 125 |
with gr.Row():
|
| 126 |
image_input = gr.Image(type="pil", label="Upload Image", interactive=True)
|
|
|
|
|
|
|
| 127 |
with gr.Row():
|
| 128 |
clear_button = gr.Button("Clear", variant="secondary", elem_id="clear-btn")
|
| 129 |
submit_button = gr.Button("Detect Objects", variant="primary", elem_id="submit-btn")
|
| 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 |
+
with gr.Row():
|
| 133 |
+
image_output = gr.Image(label="Detected Objects", elem_id="image-output")
|
| 134 |
+
|
| 135 |
|
| 136 |
demo.launch()
|
| 137 |
|