Spaces:
Running
Running
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
|
| 36 |
|
| 37 |
demo = gr.Interface(
|
| 38 |
fn=detect,
|
| 39 |
inputs=[gr.inputs.Image(label="Input image", type="pil")],
|
| 40 |
-
outputs=[
|
| 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
|
| 36 |
|
| 37 |
demo = gr.Interface(
|
| 38 |
fn=detect,
|
| 39 |
inputs=[gr.inputs.Image(label="Input image", type="pil")],
|
| 40 |
+
outputs=["image", gr.Label(num_top_classes=10, show_confidences=False)],
|
| 41 |
title="Object Counts in Image"
|
| 42 |
)
|
| 43 |
|