Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,12 +19,13 @@ def detect_objects(image):
|
|
| 19 |
# Gradio UI
|
| 20 |
with gr.Blocks() as demo:
|
| 21 |
gr.Markdown("## 🧠 YOLOv8 Object Detection (Image Upload or Camera)")
|
| 22 |
-
|
| 23 |
-
image_input = gr.Image(label="📷 Upload or Capture Image", type="numpy")
|
| 24 |
-
result_output = gr.Image(label="🔍 Detection Result", type="pil")
|
| 25 |
|
| 26 |
detect_button = gr.Button("🚀 Detect Objects")
|
| 27 |
|
| 28 |
detect_button.click(fn=detect_objects, inputs=image_input, outputs=result_output)
|
| 29 |
|
| 30 |
demo.launch()
|
|
|
|
|
|
| 19 |
# Gradio UI
|
| 20 |
with gr.Blocks() as demo:
|
| 21 |
gr.Markdown("## 🧠 YOLOv8 Object Detection (Image Upload or Camera)")
|
| 22 |
+
|
| 23 |
+
image_input = gr.Image(label="📷 Upload or Capture Image", type="numpy", height=300)
|
| 24 |
+
result_output = gr.Image(label="🔍 Detection Result", type="pil", height=300)
|
| 25 |
|
| 26 |
detect_button = gr.Button("🚀 Detect Objects")
|
| 27 |
|
| 28 |
detect_button.click(fn=detect_objects, inputs=image_input, outputs=result_output)
|
| 29 |
|
| 30 |
demo.launch()
|
| 31 |
+
|