Testing hugging face in langchain vs code

Hi Group,

I am learning lang chain and hugging face. I’m using vs code as my IDE for test purposes. I am using the huggingfaceendpoint library and chathugging face libraries. I store the hugging face token in my .env file. Every time I run my python script and invoke the model in the script. I get the authorization header invalid.
the same code when I run on google colab by saving the access token in the secret key, It works fine. Can somebody please help or let me know if you need any other information?

1 Like