Spaces:
Sleeping
Sleeping
AlshimaaGamalAlsaied
commited on
Commit
•
dfe8c33
1
Parent(s):
114c1f0
update
Browse files- app.py +2 -2
- requirements.txt +1 -1
app.py
CHANGED
@@ -5,7 +5,7 @@ import yolov7
|
|
5 |
|
6 |
#
|
7 |
# from huggingface_hub import hf_hub_download
|
8 |
-
from huggingface_hub import
|
9 |
|
10 |
|
11 |
# Images
|
@@ -14,7 +14,7 @@ from huggingface_hub import hfapi
|
|
14 |
|
15 |
def yolov7_inference(
|
16 |
image: gr.inputs.Image = None,
|
17 |
-
model_path: gr.inputs.Dropdown =
|
18 |
image_size: gr.inputs.Slider = 640,
|
19 |
conf_threshold: gr.inputs.Slider = 0.25,
|
20 |
iou_threshold: gr.inputs.Slider = 0.45,
|
|
|
5 |
|
6 |
#
|
7 |
# from huggingface_hub import hf_hub_download
|
8 |
+
from huggingface_hub import HfApi
|
9 |
|
10 |
|
11 |
# Images
|
|
|
14 |
|
15 |
def yolov7_inference(
|
16 |
image: gr.inputs.Image = None,
|
17 |
+
model_path: gr.inputs.Dropdown = HfApi(repo_id=f"alshimaa/model_baseline", filename=f"best_baseline.pt"),
|
18 |
image_size: gr.inputs.Slider = 640,
|
19 |
conf_threshold: gr.inputs.Slider = 0.25,
|
20 |
iou_threshold: gr.inputs.Slider = 0.45,
|
requirements.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
gradio
|
2 |
torch
|
3 |
yolov7detect
|
4 |
-
|
|
|
1 |
gradio
|
2 |
torch
|
3 |
yolov7detect
|
4 |
+
HfApi
|