怎么设置能够使 pycharm 运行需要 huggingface 的代码

查看 54|回复 4
作者:JNian   
hugggingface.co 无法访问。需要开 clash 系统代理才能访问,但是仍然无法跑通代码.
设置了 set HTTP_PROXY=http://127.0.0.1:7890 和设置了 set HTTPS_PROXY=https://127.0.0.1:7890 也不行,rules 增加 - 'DOMAIN-SUFFIX,huggingface.co, ***'也不行
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /api/models/Systran/faster-whisper-large-v2/revision/main (Caused by ProxyError('Unable to connect to proxy', SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)')))).
requests.exceptions.ProxyError: (MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /api/models/Systran/faster-whisper-large-v2/revision/main (Caused by ProxyError('Unable to connect to proxy', SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)'))))"), '(Request ID: 98a168c5-6b91-4817-8adf-a00730797e61)')
huggingface_hub.utils._errors.LocalEntryNotFoundError: Cannot find an appropriate cached snapshot folder for the specified revision on the local disk and outgoing traffic has been disabled. To enable repo look-ups and downloads online, pass 'local_files_only=False' as input.

proxyerror, revision, Protocol, violation

JNian
OP
  
解决了,增加- 'DOMAIN-SUFFIX,cdn-lfs-us-1.huggingface.co, 你机场的名'和导入>pip install urllib3==1.25.11
loadingimg   
export HF_ENDPOINT=https://hf-mirror.com
alexsz   
应该这样吧:HTTPS_PROXY=http://127.0.0.1:7890
RoccoShi   
直接开 TUN 模式解决一切系统代理烦恼
您需要登录后才可以回帖 登录 | 立即注册

返回顶部