Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ from huggingface_hub import hf_hub_download
|
|
| 4 |
|
| 5 |
|
| 6 |
def download_models(model_id):
|
| 7 |
-
hf_hub_download("
|
| 8 |
return f"./{model_id}"
|
| 9 |
|
| 10 |
@spaces.GPU
|
|
@@ -48,12 +48,9 @@ def app():
|
|
| 48 |
model_path = gr.Dropdown(
|
| 49 |
label="Model",
|
| 50 |
choices=[
|
| 51 |
-
"
|
| 52 |
-
"gelan-e.pt",
|
| 53 |
-
"yolov9-c.pt",
|
| 54 |
-
"yolov9-e.pt",
|
| 55 |
],
|
| 56 |
-
value="
|
| 57 |
)
|
| 58 |
image_size = gr.Slider(
|
| 59 |
label="Image Size",
|
|
@@ -93,34 +90,34 @@ def app():
|
|
| 93 |
outputs=[output_numpy],
|
| 94 |
)
|
| 95 |
|
| 96 |
-
gr.Examples(
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
)
|
| 124 |
|
| 125 |
|
| 126 |
gradio_app = gr.Blocks()
|
|
@@ -135,7 +132,6 @@ with gradio_app:
|
|
| 135 |
"""
|
| 136 |
<h3 style='text-align: center'>
|
| 137 |
Follow me for more!
|
| 138 |
-
<a href='https://twitter.com/kadirnar_ai' target='_blank'>Twitter</a> | <a href='https://github.com/kadirnar' target='_blank'>Github</a> | <a href='https://www.linkedin.com/in/kadir-nar/' target='_blank'>Linkedin</a> | <a href='https://www.huggingface.co/kadirnar/' target='_blank'>HuggingFace</a>
|
| 139 |
</h3>
|
| 140 |
""")
|
| 141 |
with gr.Row():
|
|
|
|
| 4 |
|
| 5 |
|
| 6 |
def download_models(model_id):
|
| 7 |
+
hf_hub_download("SakshiRathi77/void-space-detection/weights", filename=f"{model_id}", local_dir=f"./")
|
| 8 |
return f"./{model_id}"
|
| 9 |
|
| 10 |
@spaces.GPU
|
|
|
|
| 48 |
model_path = gr.Dropdown(
|
| 49 |
label="Model",
|
| 50 |
choices=[
|
| 51 |
+
"best.pt"
|
|
|
|
|
|
|
|
|
|
| 52 |
],
|
| 53 |
+
value="best.pt",
|
| 54 |
)
|
| 55 |
image_size = gr.Slider(
|
| 56 |
label="Image Size",
|
|
|
|
| 90 |
outputs=[output_numpy],
|
| 91 |
)
|
| 92 |
|
| 93 |
+
# gr.Examples(
|
| 94 |
+
# examples=[
|
| 95 |
+
# [
|
| 96 |
+
# "data/zidane.jpg",
|
| 97 |
+
# "gelan-e.pt",
|
| 98 |
+
# 640,
|
| 99 |
+
# 0.4,
|
| 100 |
+
# 0.5,
|
| 101 |
+
# ],
|
| 102 |
+
# [
|
| 103 |
+
# "data/huggingface.jpg",
|
| 104 |
+
# "yolov9-c.pt",
|
| 105 |
+
# 640,
|
| 106 |
+
# 0.4,
|
| 107 |
+
# 0.5,
|
| 108 |
+
# ],
|
| 109 |
+
# ],
|
| 110 |
+
# fn=yolov9_inference,
|
| 111 |
+
# inputs=[
|
| 112 |
+
# img_path,
|
| 113 |
+
# model_path,
|
| 114 |
+
# image_size,
|
| 115 |
+
# conf_threshold,
|
| 116 |
+
# iou_threshold,
|
| 117 |
+
# ],
|
| 118 |
+
# outputs=[output_numpy],
|
| 119 |
+
# cache_examples=True,
|
| 120 |
+
# )
|
| 121 |
|
| 122 |
|
| 123 |
gradio_app = gr.Blocks()
|
|
|
|
| 132 |
"""
|
| 133 |
<h3 style='text-align: center'>
|
| 134 |
Follow me for more!
|
|
|
|
| 135 |
</h3>
|
| 136 |
""")
|
| 137 |
with gr.Row():
|