atalaydenknalbant commited on
Commit
69c4230
·
verified ·
1 Parent(s): 55d4b6f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -5,19 +5,19 @@ import PIL.Image as Image
5
  from ultralytics import YOLO, YOLOv10
6
  from huggingface_hub import hf_hub_download, HfApi
7
 
8
- global repo_id="atalaydenknalbant/asl-models"
9
 
10
  def download_models(model_id):
11
- hf_hub_download(repo_id, filename=f"{model_id}", local_dir=f"./")
12
  return f"./{model_id}"
13
 
14
- def get_model_filenames(repo_id, file_extension=".pt"):
15
  api = HfApi()
16
  files = api.list_repo_files(repo_id)
17
  model_filenames = [file for file in files if file.endswith(file_extension)]
18
  return model_filenames
19
 
20
-
21
  model_filenames = get_model_filenames(repo_id)
22
  print("Model filenames:", model_filenames)
23
 
 
5
  from ultralytics import YOLO, YOLOv10
6
  from huggingface_hub import hf_hub_download, HfApi
7
 
8
+ global repo_id
9
 
10
  def download_models(model_id):
11
+ hf_hub_download(repo_id, filename = f"{model_id}", local_dir = f"./")
12
  return f"./{model_id}"
13
 
14
+ def get_model_filenames(repo_id, file_extension = ".pt"):
15
  api = HfApi()
16
  files = api.list_repo_files(repo_id)
17
  model_filenames = [file for file in files if file.endswith(file_extension)]
18
  return model_filenames
19
 
20
+ repo_id = "atalaydenknalbant/asl-models"
21
  model_filenames = get_model_filenames(repo_id)
22
  print("Model filenames:", model_filenames)
23