SSLError: Cannot instantiate a HuggingFace model
Code:tokenizer = transformers.T5Tokenizer.from_pretrained(MODEL_NAME)Result:SSLError: HTTPSConnectionPool(host=‘huggingface.co’, port=443): Max retries exceeded with url: /bigscience/mt0-large/resolve/main/spiece.model (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)’)))Note the problem occurs for many model names, e.g., “bigscience/mt0-large”Note following a search in Google, I use requests==2.27.1 andimport osos.environ[‘CURL_CA_BUNDLE’] = ‘’BUT IT DID NOT HELP!Thnak you
2024-06-11T19:10:29Z
pip install pip_system_certsAfter this the model download will use your system trust store instead of whatever it is using by default.