File size: 320 Bytes
75a02e7
67b9682
580d757
75a02e7
 
67b9682
75a02e7
 
 
1
2
3
4
5
6
7
8
9
import os

def download_model(model_name_or_path):
    # 设置环境变量
    os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com'

    # 下载模型
    os.system(
        f'mkdir -p {model_name_or_path} &&  huggingface-cli download --resume-download KitHung/InternVL_food_lr35_ep10 --local-dir {model_name_or_path}')