Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -28,17 +28,17 @@ def image_fn(image, model_path, image_size, conf_threshold, iou_threshold):
|
|
28 |
image_interface = gr.Interface(
|
29 |
fn=image_fn,
|
30 |
inputs=[
|
31 |
-
gr.
|
32 |
-
gr.
|
33 |
choices=["Aalaa/Yolov7_Visual_Pollution_Detection"],
|
34 |
value="Aalaa/Yolov7_Visual_Pollution_Detection",
|
35 |
label="Model"
|
36 |
),
|
37 |
-
gr.
|
38 |
-
gr.
|
39 |
-
gr.
|
40 |
],
|
41 |
-
outputs=gr.
|
42 |
examples=[['image1.jpg', 'Aalaa/Yolov7_Visual_Pollution_Detection', 640, 0.25, 0.45]],
|
43 |
cache_examples=True,
|
44 |
theme='default'
|
|
|
28 |
image_interface = gr.Interface(
|
29 |
fn=image_fn,
|
30 |
inputs=[
|
31 |
+
gr.Image(type="pil", label="Input Image"),
|
32 |
+
gr.Dropdown(
|
33 |
choices=["Aalaa/Yolov7_Visual_Pollution_Detection"],
|
34 |
value="Aalaa/Yolov7_Visual_Pollution_Detection",
|
35 |
label="Model"
|
36 |
),
|
37 |
+
gr.Slider(minimum=320, maximum=1280, value=640, step=32, label="Image Size"),
|
38 |
+
gr.Slider(minimum=0.0, maximum=1.0, value=0.25, step=0.05, label="Confidence Threshold"),
|
39 |
+
gr.Slider(minimum=0.0, maximum=1.0, value=0.45, step=0.05, label="IOU Threshold")
|
40 |
],
|
41 |
+
outputs=gr.Image(type="numpy", label="Output Image"),
|
42 |
examples=[['image1.jpg', 'Aalaa/Yolov7_Visual_Pollution_Detection', 640, 0.25, 0.45]],
|
43 |
cache_examples=True,
|
44 |
theme='default'
|