AlshimaaGamalAlsaied commited on
Commit
f4d9741
1 Parent(s): b276cff
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -4,6 +4,7 @@ import yolov7
4
 
5
 
6
  from huggingface_hub import hf_hub_download
 
7
 
8
  # Images
9
  #torch.hub.download_url_to_file('https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg', 'zidane.jpg')
@@ -11,7 +12,7 @@ from huggingface_hub import hf_hub_download
11
 
12
  def yolov7_inference(
13
  image: gr.inputs.Image = None,
14
- model_path: gr.inputs.Dropdown = hf_hub_download(repo_id=f"model_baseline", filename=f"best%20_baseline.pt"),
15
  image_size: gr.inputs.Slider = 640,
16
  conf_threshold: gr.inputs.Slider = 0.25,
17
  iou_threshold: gr.inputs.Slider = 0.45,
 
4
 
5
 
6
  from huggingface_hub import hf_hub_download
7
+ from huggingface_hub import hfapi
8
 
9
  # Images
10
  #torch.hub.download_url_to_file('https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg', 'zidane.jpg')
 
12
 
13
  def yolov7_inference(
14
  image: gr.inputs.Image = None,
15
+ model_path: gr.inputs.Dropdown = hfapi(repo_id=f"model_baseline", filename=f"best_baseline.pt"),
16
  image_size: gr.inputs.Slider = 640,
17
  conf_threshold: gr.inputs.Slider = 0.25,
18
  iou_threshold: gr.inputs.Slider = 0.45,