Spaces:
Running
on
Zero
Running
on
Zero
update
Browse files- app.py +24 -0
- gelan-c.pt +0 -3
- gelan-e.pt +0 -3
- yolov9-c.pt +0 -3
- yolov9-e.pt +0 -3
app.py
CHANGED
@@ -3,9 +3,12 @@ import spaces
|
|
3 |
import os
|
4 |
from huggingface_hub import hf_hub_download
|
5 |
|
|
|
6 |
def download_models(model_id):
|
7 |
hf_hub_download("merve/yolov9", filename=f"{model_id}", local_dir=f"./{model_id}")
|
8 |
return f"./{model_id}"
|
|
|
|
|
9 |
@spaces.GPU
|
10 |
def yolov9_inference(img_path, model_id, image_size, conf_threshold, iou_threshold):
|
11 |
"""
|
@@ -91,6 +94,27 @@ def app():
|
|
91 |
],
|
92 |
outputs=[output_numpy],
|
93 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
|
95 |
|
96 |
gradio_app = gr.Blocks()
|
|
|
3 |
import os
|
4 |
from huggingface_hub import hf_hub_download
|
5 |
|
6 |
+
|
7 |
def download_models(model_id):
|
8 |
hf_hub_download("merve/yolov9", filename=f"{model_id}", local_dir=f"./{model_id}")
|
9 |
return f"./{model_id}"
|
10 |
+
|
11 |
+
|
12 |
@spaces.GPU
|
13 |
def yolov9_inference(img_path, model_id, image_size, conf_threshold, iou_threshold):
|
14 |
"""
|
|
|
94 |
],
|
95 |
outputs=[output_numpy],
|
96 |
)
|
97 |
+
|
98 |
+
gr.Examples(
|
99 |
+
examples=[
|
100 |
+
[
|
101 |
+
"gelan-e.pt",
|
102 |
+
640,
|
103 |
+
0.4,
|
104 |
+
0.5,
|
105 |
+
],
|
106 |
+
],
|
107 |
+
fn=yolov9_inference,
|
108 |
+
inputs=[
|
109 |
+
img_path,
|
110 |
+
model_path,
|
111 |
+
image_size,
|
112 |
+
conf_threshold,
|
113 |
+
iou_threshold,
|
114 |
+
],
|
115 |
+
outputs=[output_numpy],
|
116 |
+
cache_examples=True,
|
117 |
+
)
|
118 |
|
119 |
|
120 |
gradio_app = gr.Blocks()
|
gelan-c.pt
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:0c41b9c016a53e0ba1848979a22d5535c3aa858548c484c4288b865e234d660b
|
3 |
-
size 51508261
|
|
|
|
|
|
|
|
gelan-e.pt
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:11777ccf5faf5d4a23ef1a2059a88b7eb972c1b2f81a3f68960121c1f391130d
|
3 |
-
size 117203713
|
|
|
|
|
|
|
|
yolov9-c.pt
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:e441b2dc84bd581b50a13c745864532c828da7508539b32a6fd603a745d5d94a
|
3 |
-
size 103153312
|
|
|
|
|
|
|
|
yolov9-e.pt
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:c275516cc0451f99871ce9a0f3d244528a9d16ae70c7b1868ec4d3a2754189f2
|
3 |
-
size 140217688
|
|
|
|
|
|
|
|