Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -93,8 +93,8 @@ def video_fn(model_path, video_file, conf_thres, iou_thres, start_sec, duration)
|
|
93 |
image_interface = gr.Interface(
|
94 |
fn=image_fn,
|
95 |
inputs=[
|
96 |
-
gr.
|
97 |
-
gr.
|
98 |
choices=[
|
99 |
"Aalaa/Yolov7_Visual_Pollution_Detection",
|
100 |
#"kadirnar/yolov7-v0.1",
|
@@ -106,7 +106,7 @@ image_interface = gr.Interface(
|
|
106 |
#gr.inputs.Slider(minimum=0.0, maximum=1.0, default=0.25, step=0.05, label="Confidence Threshold"),
|
107 |
#gr.inputs.Slider(minimum=0.0, maximum=1.0, default=0.45, step=0.05, label="IOU Threshold")
|
108 |
],
|
109 |
-
outputs=gr.
|
110 |
title="Smart Environmental Eye (SEE)",
|
111 |
examples=[['image1.jpg', 'Aalaa/Yolov7_Visual_Pollution_Detection', 640, 0.25, 0.45]],
|
112 |
cache_examples=True,
|
@@ -117,8 +117,8 @@ image_interface = gr.Interface(
|
|
117 |
video_interface = gr.Interface(
|
118 |
fn=video_fn,
|
119 |
inputs=[
|
120 |
-
gr.
|
121 |
-
gr.
|
122 |
choices=[
|
123 |
"Aalaa/Yolov7_Visual_Pollution_Detection",
|
124 |
#"kadirnar/yolov7-v0.1",
|
|
|
93 |
image_interface = gr.Interface(
|
94 |
fn=image_fn,
|
95 |
inputs=[
|
96 |
+
gr.Image(type="pil", label="Input Image"),
|
97 |
+
gr.Dropdown(
|
98 |
choices=[
|
99 |
"Aalaa/Yolov7_Visual_Pollution_Detection",
|
100 |
#"kadirnar/yolov7-v0.1",
|
|
|
106 |
#gr.inputs.Slider(minimum=0.0, maximum=1.0, default=0.25, step=0.05, label="Confidence Threshold"),
|
107 |
#gr.inputs.Slider(minimum=0.0, maximum=1.0, default=0.45, step=0.05, label="IOU Threshold")
|
108 |
],
|
109 |
+
outputs=gr.Image(type="filepath", label="Output Image"),
|
110 |
title="Smart Environmental Eye (SEE)",
|
111 |
examples=[['image1.jpg', 'Aalaa/Yolov7_Visual_Pollution_Detection', 640, 0.25, 0.45]],
|
112 |
cache_examples=True,
|
|
|
117 |
video_interface = gr.Interface(
|
118 |
fn=video_fn,
|
119 |
inputs=[
|
120 |
+
gr.Video(source = "upload", type = "mp4", label = "Input Video"),
|
121 |
+
gr.Dropdown(
|
122 |
choices=[
|
123 |
"Aalaa/Yolov7_Visual_Pollution_Detection",
|
124 |
#"kadirnar/yolov7-v0.1",
|