Harry2687 commited on
Commit
5b0d0fe
·
1 Parent(s): 8e4fb68

updated download script and requirements

Browse files
Files changed (2) hide show
  1. download_model.py +8 -5
  2. requirements.txt +2 -0
download_model.py CHANGED
@@ -1,7 +1,10 @@
1
  import os
2
- import gdown
3
 
4
- modelsave_name = 'model_parameters.pt'
5
- if os.path.isfile(modelsave_name) == False:
6
- url = 'https://drive.google.com/file/d/1_mYn2LrhG080Xvt26tWBtJ8U_0F2E1-s/view?usp=sharing'
7
- gdown.download(url, output=modelsave_name, fuzzy=True)
 
 
 
 
1
  import os
2
+ from huggingface_hub import hf_hub_download
3
 
4
+ model_name = 'resnetModel_128_epoch_2.pt'
5
+ if os.path.isfile(model_name) == False:
6
+ hf_hub_download(
7
+ repo_id='Harry2687/Gender-CNN',
8
+ filename=model_name,
9
+ local_dir='./'
10
+ )
requirements.txt CHANGED
@@ -10,6 +10,7 @@ fsspec==2024.5.0
10
  gdown==5.2.0
11
  h11==0.14.0
12
  htmltools==0.6.0
 
13
  idna==3.7
14
  Jinja2==3.1.4
15
  linkify-it-py==2.0.3
@@ -27,6 +28,7 @@ pillow==10.3.0
27
  prompt_toolkit==3.0.50
28
  PySocks==1.7.1
29
  python-multipart==0.0.20
 
30
  questionary==2.1.0
31
  requests==2.31.0
32
  setuptools==75.8.0
 
10
  gdown==5.2.0
11
  h11==0.14.0
12
  htmltools==0.6.0
13
+ huggingface-hub==0.28.1
14
  idna==3.7
15
  Jinja2==3.1.4
16
  linkify-it-py==2.0.3
 
28
  prompt_toolkit==3.0.50
29
  PySocks==1.7.1
30
  python-multipart==0.0.20
31
+ PyYAML==6.0.2
32
  questionary==2.1.0
33
  requests==2.31.0
34
  setuptools==75.8.0