Spaces:
Sleeping
Sleeping
pankaj-munde
commited on
Commit
•
664b229
1
Parent(s):
30f84ae
Update app.py
Browse files
app.py
CHANGED
@@ -49,17 +49,17 @@ def fScout_yolo_prediction(image, threshold=0.25):
|
|
49 |
tmp["Count"] = v
|
50 |
new_res.append(tmp)
|
51 |
|
52 |
-
return fimage
|
53 |
|
54 |
else:
|
55 |
-
return fimage
|
56 |
|
57 |
|
58 |
# Create the Gradio interface
|
59 |
app = gr.Interface(
|
60 |
fn=fScout_yolo_prediction,
|
61 |
inputs=gr.Image(type="numpy", label="Upload Image"),
|
62 |
-
outputs="image",
|
63 |
title="Object Detection",
|
64 |
description="Upload an image to detect objects."
|
65 |
)
|
|
|
49 |
tmp["Count"] = v
|
50 |
new_res.append(tmp)
|
51 |
|
52 |
+
return fimage, new_res
|
53 |
|
54 |
else:
|
55 |
+
return fimage, []
|
56 |
|
57 |
|
58 |
# Create the Gradio interface
|
59 |
app = gr.Interface(
|
60 |
fn=fScout_yolo_prediction,
|
61 |
inputs=gr.Image(type="numpy", label="Upload Image"),
|
62 |
+
outputs=["image", "json"],
|
63 |
title="Object Detection",
|
64 |
description="Upload an image to detect objects."
|
65 |
)
|