Unable to run MentalRoBERTa

#1
by lilias - opened

Hello,

I am trying to use MentalRoBERTa on kaggle.
However, I am getting the following error.

OSError: mental/mental-roberta-base is not a local folder and is not a valid model identifier listed on 'https://huggingface.co/models'
If this is a private repository, make sure to pass a token having permission to this repo with use_auth_token or log in with huggingface-cli login and pass use_auth_token=True.

Hi,

You need to pass the auth token to access the model. A simple but non-secure way of accessing the library is:

tokenizer = AutoTokenizer.from_pretrained("mental/mental-roberta-base", use_auth_token="your_actual_token_here")
model = AutoModelForSequenceClassification.from_pretrained("mental/mental-roberta-base", use_auth_token="your_actual_token_here")

I recommend you save your token as an environment variable and access it this way instead, but the above will at least get you started.

Sign up or log in to comment