为了解决使用代理也连不上huggingface的问题
** 镜像网站(https://hf-mirror.com/)**
安装依赖
$ pip install -U huggingface_hub
设置环境
export HF_ENDPOINT=https://hf-mirror.com
$ vim ~/.bashrc
$ source ~/.bashrc
这样就可以用pipeline了
from transformers import pipeline</
本文介绍了如何在使用代理时通过镜像网站https://hf-mirror.com解决在HuggingFace上安装依赖的问题,包括设置环境变量和使用预设的sentiment-analysispipeline进行情感分析示例。
为了解决使用代理也连不上huggingface的问题
** 镜像网站(https://hf-mirror.com/)**
安装依赖
$ pip install -U huggingface_hub
设置环境
export HF_ENDPOINT=https://hf-mirror.com
$ vim ~/.bashrc
$ source ~/.bashrc
这样就可以用pipeline了
from transformers import pipeline</
2204
783
1万+

被折叠的 条评论
为什么被折叠?