Spaces:
Sleeping
Sleeping
Update image_detection.py
Browse files- image_detection.py +1 -2
image_detection.py
CHANGED
@@ -13,14 +13,13 @@ def fonk(img_path):
|
|
13 |
if result.boxes is not None and len(result.boxes):
|
14 |
box = result.boxes
|
15 |
x1, y1, x2, y2 = map(int, box.xyxy[0])
|
16 |
-
print(x1, y1, x2, y2)
|
17 |
img = cv2.rectangle(img, (x1, y1), (x2, y2), (0, 255, 0), 2)
|
18 |
return img
|
19 |
|
20 |
demo = gr.Interface(fonk,
|
21 |
inputs= gr.Image(type="filepath"),
|
22 |
outputs=gr.Image(),
|
23 |
-
examples= "images.jpeg"
|
24 |
)
|
25 |
demo.launch()
|
26 |
|
|
|
13 |
if result.boxes is not None and len(result.boxes):
|
14 |
box = result.boxes
|
15 |
x1, y1, x2, y2 = map(int, box.xyxy[0])
|
|
|
16 |
img = cv2.rectangle(img, (x1, y1), (x2, y2), (0, 255, 0), 2)
|
17 |
return img
|
18 |
|
19 |
demo = gr.Interface(fonk,
|
20 |
inputs= gr.Image(type="filepath"),
|
21 |
outputs=gr.Image(),
|
22 |
+
#examples= "images.jpeg"
|
23 |
)
|
24 |
demo.launch()
|
25 |
|