Ubuntu
commited on
Commit
·
1b92647
1
Parent(s):
14ca485
fixed input image
Browse files
app.py
CHANGED
@@ -9,10 +9,9 @@ def detect_hotspots(image):
|
|
9 |
result = model(image)
|
10 |
|
11 |
for r in result:
|
12 |
-
print(r.boxes)
|
13 |
im_array = r.plot()
|
14 |
# im = Image.fromarray(im_array[..., ::-1])
|
15 |
-
return Image.fromarray(im_array)
|
16 |
|
17 |
|
18 |
demo = gr.Interface(fn=detect_hotspots, inputs=gr.Image(type='pil'), outputs="image", title="YOLO Object Detection")
|
|
|
9 |
result = model(image)
|
10 |
|
11 |
for r in result:
|
|
|
12 |
im_array = r.plot()
|
13 |
# im = Image.fromarray(im_array[..., ::-1])
|
14 |
+
return Image.fromarray(im_array[..., ::-1])
|
15 |
|
16 |
|
17 |
demo = gr.Interface(fn=detect_hotspots, inputs=gr.Image(type='pil'), outputs="image", title="YOLO Object Detection")
|