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
Score of all classes
#7
by alextyche - opened
Hi, i'm using this code in python:
classifier = pipeline('sentiment-analysis',
model="nlptown/bert-base-multilingual-uncased-sentiment")
results = classifier(['Hi, how are you', 'hello, i'm great'])
I obtain the star rating (from 1 to 5) and the score for that number of stars. However, i would like to obtain the score for all possible star ratings. How can i do that?
Thank you very much for your attention.
Use the return_all_scores param to get all label scores.
Example: classifier(['Hi, how are you', 'hello, i'm great'], return_all_scores=True) should return a list of dicts for each string.
hi can you help me knowing what these star actually mean?