401 Client Error: Unauthorized for url: https://huggingface.co/joeddav/xlm-roberta-large-xnli/resolve/main/config.json

#6
by gurkany - opened

When I try to use the pipeline I get the following error
classifier = pipeline(
"zero-shot-classification",
model="joeddav/xlm-roberta-large-xnli",
device="cpu"
)

OSError: We couldn't connect to 'https://huggingface.co/' to load this model and it looks like joeddav/xlm-roberta-large-xnli is not the path to a directory conaining a config.json file.
Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.

Yesterday the model was updated and "You need to agree to share your contact informations to access this model".

Solution: Create an account, create a token (https://huggingface.co/settings/tokens) and submit it with your request:

classifier = pipeline(
"zero-shot-classification",
model="joeddav/xlm-roberta-large-xnli",
device="cpu",
use_auth_token="your_token"
)

With use_auth_token parameter i could be able to download the model again.

gurkany changed discussion status to closed

Sign up or log in to comment