Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -16,13 +16,10 @@ def yolo_inference(images, model_id, conf_threshold, iou_threshold, max_detectio
|
|
16 |
show_conf=True,
|
17 |
)
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
annotated_images.append(im)
|
24 |
-
|
25 |
-
return annotated_images
|
26 |
|
27 |
interface = gr.Interface(
|
28 |
fn=yolo_inference,
|
|
|
16 |
show_conf=True,
|
17 |
)
|
18 |
|
19 |
+
for r in results:
|
20 |
+
image_array = r.plot()
|
21 |
+
image = Image.fromarray(image_array[..., ::-1])
|
22 |
+
return image
|
|
|
|
|
|
|
23 |
|
24 |
interface = gr.Interface(
|
25 |
fn=yolo_inference,
|