KitHung commited on
Commit
75a02e7
·
verified ·
1 Parent(s): 9cce815

Update download.py

Browse files

Update: download.py

Files changed (1) hide show
  1. download.py +7 -7
download.py CHANGED
@@ -1,9 +1,9 @@
1
- from huggingface_hub import hf_hub_download
2
- import joblib
3
 
4
- REPO_ID = "KitHung/InternVL_food_lr35_ep10"
 
 
5
 
6
- def download_model(model_path):
7
- joblib.load(
8
- hf_hub_download(repo_id=REPO_ID, filename=model_path)
9
- )
 
1
+ import os
 
2
 
3
+ def download_assist_tuner(model_name_or_path):
4
+ # 设置环境变量
5
+ os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com'
6
 
7
+ # 下载模型
8
+ os.system(
9
+ f'mkdir -p {model_name_or_path} && huggingface-cli download --resume-download KitHung/InternVL_food_lr35_ep10 --local-dir {model_name_or_path}')