【秒解决!!huggingface_hub.utils._errors.LocalEntryNotFoundError】
【秒解决:huggingface_hub.utils._errors.LocalEntryNotFoundError】
文章共134字 · 阅读需要大约1分钟
一键AI生成摘要,助你高效阅读
问答
·
【秒解决:huggingface_hub.utils._errors.LocalEntryNotFoundError】
报错详细
huggingface_hub.utils._errors.LocalEntryNotFoundError: An error happened while trying to locate the file on the Hub and we cannot find the requested files in the local cache. Please check your connection and try again or make sure your Internet connection is on
问题说明
在使用到huggingface时,下载连接不稳定导致,ConnectError。
解决方式
1)在python代码中加入
os.environ["HF_ENDPOINT"] = "https://hf-mirror.com"
2)在命令行中设置环境变量
HF_ENDPOINT=https://hf-mirror.com python xxx.py
参考链接:https://github.com/Stability-AI/generative-models/issues/215#issuecomment-1960803222
更多推荐
已为社区贡献2条内容
所有评论(0)