Spaces:
Runtime error
Runtime error
updated themes images and model selector
Browse files
app.py
CHANGED
@@ -4,8 +4,8 @@ import yolov7
|
|
4 |
|
5 |
|
6 |
# Images
|
7 |
-
torch.hub.download_url_to_file('https://github.com/
|
8 |
-
torch.hub.download_url_to_file('https://
|
9 |
|
10 |
def yolov7_inference(
|
11 |
image: gr.inputs.Image = None,
|
@@ -40,7 +40,7 @@ inputs = [
|
|
40 |
"nihalbaig/yolov7",
|
41 |
|
42 |
],
|
43 |
-
default="
|
44 |
label="Model",
|
45 |
),
|
46 |
gr.inputs.Slider(minimum=320, maximum=1280, default=640, step=32, label="Image Size"),
|
@@ -49,9 +49,9 @@ inputs = [
|
|
49 |
]
|
50 |
|
51 |
outputs = gr.outputs.Image(type="filepath", label="Output Image")
|
52 |
-
title = "
|
53 |
|
54 |
-
examples = [['
|
55 |
demo_app = gr.Interface(
|
56 |
fn=yolov7_inference,
|
57 |
inputs=inputs,
|
@@ -59,6 +59,6 @@ demo_app = gr.Interface(
|
|
59 |
title=title,
|
60 |
examples=examples,
|
61 |
cache_examples=True,
|
62 |
-
theme='
|
63 |
)
|
64 |
demo_app.launch(debug=True, enable_queue=True)
|
|
|
4 |
|
5 |
|
6 |
# Images
|
7 |
+
torch.hub.download_url_to_file('https://github.com/nihalbaig0/BD-Vehicle-Detection/blob/main/images/bondor_to_kodomtoli.jpg', 'bondor_to_kodomtoli.jpg')
|
8 |
+
torch.hub.download_url_to_file('https://github.com/nihalbaig0/BD-Vehicle-Detection/blob/main/images/lamabazar_to_versitygate.jpg', 'lamabazar_to_versitygate.jpg')
|
9 |
|
10 |
def yolov7_inference(
|
11 |
image: gr.inputs.Image = None,
|
|
|
40 |
"nihalbaig/yolov7",
|
41 |
|
42 |
],
|
43 |
+
default="nihalbaig0/yolov7",
|
44 |
label="Model",
|
45 |
),
|
46 |
gr.inputs.Slider(minimum=320, maximum=1280, default=640, step=32, label="Image Size"),
|
|
|
49 |
]
|
50 |
|
51 |
outputs = gr.outputs.Image(type="filepath", label="Output Image")
|
52 |
+
title = "Project-350: BD Vehicle Detection for Autonomous Vehicle"
|
53 |
|
54 |
+
examples = [['bondor_to_kodomtoli.jpg', 'nihalbaig0/yolov7', 640, 0.25, 0.45], ['lamabazar_to_versitygate.jpg', 'nihalbaig0/yolov7', 640, 0.25, 0.45]]
|
55 |
demo_app = gr.Interface(
|
56 |
fn=yolov7_inference,
|
57 |
inputs=inputs,
|
|
|
59 |
title=title,
|
60 |
examples=examples,
|
61 |
cache_examples=True,
|
62 |
+
theme='darkhuggingface',
|
63 |
)
|
64 |
demo_app.launch(debug=True, enable_queue=True)
|