-
Notifications
You must be signed in to change notification settings - Fork 672
Authorization header is correct, but the token seems invalid #2507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @DevPatel1412, this is definitely a user token issue. Could you try to create a new finegrained one in https://huggingface.co/settings/tokens and click on "make calls to the serverless Inference API" Then use it in your code by passing Note: a "write" token should work as well but is not recommended security-wise. |
Hi @Wauplin , |
Hi @Wauplin, |
facing a similar issue, tried the things above but still doesn't work |
Hi @varad0309, did you create a new token at https://huggingface.co/settings/tokens with "Inference API" access enabled as mentioned above? echo $HF_TOKEN if cat ~/.cache/huggingface/token if the error persists, please let us know and please share the full traceback including the Request ID that is mentioned in the error message so we can investigate further. |
Describe the bug
So my issue is this error, I was working with same 'HF_token' having the write permission and I am working with Mistral Nemo 12B Instruct , the model was working well from last few days without any issue and today suddenly this error appears .
This error appears to be persistant, i have refresh the token and also tried with other model too and also check the hugging face interface api server status as well, but the issue remains the same.
Issue
BadRequestError
huggingface_hub.utils._errors.BadRequestError: (Request ID: Mq1mDWKbogI0AleJS0HJM)
Bad request:
Authorization header is correct, but the token seems invalid
This is my
app.py
file, and I have not modified or added any other files:Reproduction
No response
Logs
System info
The text was updated successfully, but these errors were encountered: