Spaces:
Sleeping
Sleeping
Commit
·
0264c52
1
Parent(s):
51c53b9
Update app.py
Browse files
app.py
CHANGED
@@ -60,7 +60,7 @@ def yolo_predict(image: np.ndarray, iou_thresh: float = 0.75, thresh: float = 0.
|
|
60 |
)
|
61 |
plot_img = draw_predictions(image, nms_boxes, class_labels=config.PASCAL_CLASSES)
|
62 |
|
63 |
-
return plot_img
|
64 |
|
65 |
|
66 |
def draw_predictions(image: np.ndarray, boxes: list[list], class_labels: list[str]) -> np.ndarray:
|
@@ -118,7 +118,7 @@ demo = gr.Interface(
|
|
118 |
gr.Slider(0, 1, value=0.75, step=0.05, label="IOU Threshold"),
|
119 |
gr.Slider(0, 1, value=0.75, step=0.05, label="Threshold")
|
120 |
],
|
121 |
-
outputs=gr.
|
122 |
examples=[
|
123 |
["examples/000001.jpg", 0.75, 0.75],
|
124 |
["examples/000002.jpg", 0.75, 0.75],
|
|
|
60 |
)
|
61 |
plot_img = draw_predictions(image, nms_boxes, class_labels=config.PASCAL_CLASSES)
|
62 |
|
63 |
+
return [plot_img]
|
64 |
|
65 |
|
66 |
def draw_predictions(image: np.ndarray, boxes: list[list], class_labels: list[str]) -> np.ndarray:
|
|
|
118 |
gr.Slider(0, 1, value=0.75, step=0.05, label="IOU Threshold"),
|
119 |
gr.Slider(0, 1, value=0.75, step=0.05, label="Threshold")
|
120 |
],
|
121 |
+
outputs=gr.Gallery(rows=1, columns=1),
|
122 |
examples=[
|
123 |
["examples/000001.jpg", 0.75, 0.75],
|
124 |
["examples/000002.jpg", 0.75, 0.75],
|