Can't enter token Id in kaggle notebooks

Hey guys , i am facing a problem and can’t login through token in kaggle notebook

!huggingface-cli login

I typed but it’s not taking input in Token

In opposite Google colab working fine

I need to run file in kaggle

Any solution?

Facing the same issue. Any updates on this?

from huggingface_hub import notebook_login
notebook_login()

You can run this code in a notebook cell and pass on the auth_token that you have.
Running this code will open a widget and you can enter the token in here and click on login and then move to another cell.
(Note: Once you click on login you won’t receive any message however it will work if you try to run the next cell)

4 Likes

Many thanks for your answer. Does this workaround work to write permission?

tagging @Wauplin working on huggingface_hub

Yes!

Another login solution is to set the HF_TOKEN environment variable with one of your tokens. See the authentication guide here.

Thanks, this worked just fine

I can’t seem to find a solution for this error. Trying to log in from a kaggle notebook. Need help. TIA

Code:

from huggingface_hub import login
login()

Error:

(MaxRetryError('HTTPSConnectionPool(host=\'huggingface.co\', port=443): Max retries exceeded with url: /api/whoami-v2 (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7c0f2a7882b0>: Failed to resolve \'huggingface.co\' ([Errno -3] Temporary failure in name resolution)"))'), '(Request ID: 538e19a5-e246-4c0b-8ca4-e8fc00dc9a28)')
1 Like

SSL issue?