How can I authenticate a token with HuggingFace Hub?

I am following the workflow in the link to learn knime,

but I am unable to authenticate the API key, so I would like to ask for help.

I tried changing the user name on HuggingFace Hub, creating several tokens, and signing up for a new account, but I only get the same error message. help me…

1.2 - HuggingFace Hub – KNIME Community Hub%20Large%20Language%20Models/1.2%20-%20HuggingFace%20Hub~GReXLig1IpnskCD3/most-recent)

huggingface

Hi @liante,

Did you configure the node “Credentials” correctly ?
You just have to generate a token on this page : HuggingFace | Create Access Tokens
image
(i revoked this token, don’t bother copying it :blush:)

and then copy the token (starting with hf_xxxxxxxx) in Knime password field, you dont need the user actually :

And it’s working just fine. Otherwise please check the console to see if you don’t have any certificate issue or maybe VPN / Antivirus / Firewall …

I had trouble when i’m on my company VPN and it does not work like you.

BR
Samir

1 Like

Hi @SamirAbida ,
I got this error :
ValueError: Error raised by inference API: Cannot override task for LLM models
any idea ?

Hi @psfard,

Huggingface just changed the api url. Maybe you should just update langchain and huggingface hub in your python :

pip install langchain huggingface-hub

Let me know if that is solving your issue.

Br,
Samir

Hi @SamirAbida ,
many thanks for your prompt assistance, I update langinchain as you told me :

(final_python_env) C:\Users\Act>pip install langchain huggingface-hub

but same error appears :frowning:

I even restart Knime after that but same

@SamirAbida I think I find the problem something was wrong with my prompt !

1 Like

Great, glad that u found your problem. Do not hesitate to share your solution in case someone else search this topic.

Happy kniming !
Br,
Samir

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.