Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -22,11 +22,11 @@ def yolo_inference(image):
|
|
22 |
return result_image, {labels[int(box.cls)]: float(box.conf) for box in boxes}
|
23 |
|
24 |
|
25 |
-
# Set up Gradio interface
|
26 |
-
inputs = gr.
|
27 |
outputs = [
|
28 |
-
gr.
|
29 |
-
gr.
|
30 |
]
|
31 |
|
32 |
gr.Interface(
|
|
|
22 |
return result_image, {labels[int(box.cls)]: float(box.conf) for box in boxes}
|
23 |
|
24 |
|
25 |
+
# Set up Gradio interface using the updated method
|
26 |
+
inputs = gr.Image(type="pil", label="Upload an Image")
|
27 |
outputs = [
|
28 |
+
gr.Image(type="pil", label="Detection Output"),
|
29 |
+
gr.JSON(label="Detection Results"),
|
30 |
]
|
31 |
|
32 |
gr.Interface(
|