Closed massimoaria closed 3 weeks ago
The issue also appears when using different models, i.e. "SamLowe/roberta-base-go_emotions", "nlptown/bert-base-multilingual-uncased-sentiment", "roberta-large-mnli", etc.
Models like BERT, RoBERTa, etc. all take a max sequence length of 512 tokens. Check out this thread for more info: https://discuss.huggingface.co/t/longformer-and-sentiment-analysis/9416
Trying to use a classify task model with this simple text (an abstract of a scientific paper), the function returns an error. Using other abstracts as examples the function works well.
Here the reprex of the issue:
Created on 2023-11-02 with reprex v2.0.2