Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ def draw_bounding_boxes(image, detections, font_path=None, font_size=50):
|
|
36 |
ymax = box['ymax']
|
37 |
|
38 |
# Draw the bounding box
|
39 |
-
draw.rectangle([(xmin, ymin), (xmax, ymax)], outline="red", width=
|
40 |
|
41 |
# Optionally, you can also draw the label and score
|
42 |
label = detection['label']
|
@@ -67,7 +67,7 @@ demo = gr.Interface(fn=detect_object,
|
|
67 |
inputs=[gr.Image(label="Select Image",type="pil")],
|
68 |
outputs=[gr.Image(label="Processed Image", type="pil")],
|
69 |
title="Object Detector",
|
70 |
-
description="Detect objects in the input image
|
71 |
demo.launch()
|
72 |
|
73 |
|
|
|
36 |
ymax = box['ymax']
|
37 |
|
38 |
# Draw the bounding box
|
39 |
+
draw.rectangle([(xmin, ymin), (xmax, ymax)], outline="red", width=5)
|
40 |
|
41 |
# Optionally, you can also draw the label and score
|
42 |
label = detection['label']
|
|
|
67 |
inputs=[gr.Image(label="Select Image",type="pil")],
|
68 |
outputs=[gr.Image(label="Processed Image", type="pil")],
|
69 |
title="Object Detector",
|
70 |
+
description="Detect objects in the input image with bounding boxes.")
|
71 |
demo.launch()
|
72 |
|
73 |
|