Unable to Read Username for 'https://huggingface.co'

I am trying to git clone meta-llama/Llama-2-7b-hf model

I use the command “git clone $url”

Where
url = https://huggingface.com/meta-llama/Llama-2-7b-hf

And it has worked for other models but doesnt work when I try to clone the above Meta model

I get the error "could not read username for ‘https://huggingface.co’: terminal prompts disabled

Any idea what could be wrong and how it can be fixed.
Thanks in advance for your responses.

3 Likes

same i have same problem in jupyter lab

I also have this problem!
It’s solved by using the follow commands

pip install huggingface_hub

from huggingface_hub import notebook_login

notebook_login()

then input your Token of your huggingface amount, the problem will be solved.

1 Like

Doesn’t work for me

1 Like

The gated model can only be used with tokens from pre-authorized accounts.