Instructions to use nlptown/bert-base-multilingual-uncased-sentiment with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nlptown/bert-base-multilingual-uncased-sentiment with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="nlptown/bert-base-multilingual-uncased-sentiment")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("nlptown/bert-base-multilingual-uncased-sentiment") model = AutoModelForSequenceClassification.from_pretrained("nlptown/bert-base-multilingual-uncased-sentiment", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Error: Sequence Classification class is down on Inference API
#9
by pip-install - opened
When I send the following JSON body (for multiple results) to the inference API:
{
"inputs": [
"I love you!",
"I hate you"
]
}
The inference API is giving me the following error:
{
"error": "Could not load model nlptown/bert-base-multilingual-uncased-sentiment with any of the following classes: (<class 'transformers.models.bert.modeling_bert.BertForSequenceClassification'>, <class 'transformers.models.bert.modeling_tf_bert.TFBertForSequenceClassification'>)."
}
Can anyone fix this please, I don't have enough knowledge on hugging face environment.