Error 401 Client Error: Unauthorized for url

I get " HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/Whisper%20Small%20manju%20Mal/resolve/main/config.json"

Did you solve your problem.

pls help

You may need to set a token for the model e processor.

Hi, @Deepakkori45
You must generate a “write” token under your access tokens page

then, filling that token by below cli command

huggingface-cli login

model = AutoModelForCausalLM.from_pretrained(
“meta-llama/Llama-2-7b-hf”,
token=‘’
)

try passing your token here it works like a charm

This worked for me