Testing hugging face in langchain vs code

If it works in Colab, then you’re probably just failing to pass the token. In that case, set the HF_TOKEN environment variable or write login() in the Python code to be sure. Don’t forget to install the library beforehand.

pip install -U huggingface_hub