Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -32,12 +32,12 @@ def detect(image):
|
|
32 |
draw.rectangle((x1, y1, x2, y2), outline="red", width=2)
|
33 |
draw.text((x1, y1), label_name, fill="white")
|
34 |
|
35 |
-
return image, counts
|
36 |
|
37 |
demo = gr.Interface(
|
38 |
fn=detect,
|
39 |
inputs=[gr.inputs.Image(label="Input image", type="pil")],
|
40 |
-
outputs=["image", gr.
|
41 |
title="Object Counts in Image"
|
42 |
)
|
43 |
|
|
|
32 |
draw.rectangle((x1, y1, x2, y2), outline="red", width=2)
|
33 |
draw.text((x1, y1), label_name, fill="white")
|
34 |
|
35 |
+
return image, counts, counts
|
36 |
|
37 |
demo = gr.Interface(
|
38 |
fn=detect,
|
39 |
inputs=[gr.inputs.Image(label="Input image", type="pil")],
|
40 |
+
outputs=["image", gr.BarPlot(), gr.Textbox()],
|
41 |
title="Object Counts in Image"
|
42 |
)
|
43 |
|