国内访问huggingface

(1)在终端安装依赖:

pip install -U huggingface_hub

(2)设置环境

$ export HF_ENDPOINT=https://hf-mirror.com

(3)写入~/.bashrc:,在文件末尾加上

vim ~/.bashrc
export HF_ENDPOINT=https://hf-mirror.com

(4)更新环境变量

source ~/.bashrc

猜你喜欢

转载自blog.csdn.net/2301_76814617/article/details/141331125