Downloads · 30 days
111
0% of all-time downloads
aiknowyou/it-emotion-analyzer
it-emotion-analyzer is a text classification model from aiknowyou. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as cc-by-sa-4.0.
This is a model for emotion analysis of italian sentences trained on a translated dataset by Google Translator. It maps sentences & paragraphs with 6 emotions which are:
Downloads · 30 days
111
0% of all-time downloads
All-time downloads
26.7K
Public
Repo size
880 MB
Likes
3
Public
Click a slice to open those files.
.bin440 MB · 100%
From the Hugging Face model README
This is a model for emotion analysis of italian sentences trained on a translated dataset by Google Translator. It maps sentences & paragraphs with 6 emotions which are:
Using this model becomes easy when you have transformers installed:
pip install -U transformers
Then you can use the model like this:
from transformers import AutoTokenizer, AutoModelForSequenceClassification
from transformers import pipeline
sentences = ["Questa è una frase triste", "Questa è una frase felice", "Questa è una frase di stupore"]
tokenizer = AutoTokenizer.from_pretrained("aiknowyou/it-emotion-analyzer")
model = AutoModelForSequenceClassification.from_pretrained("aiknowyou/it-emotion-analyzer")
emotion_analysis = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
emotion_analysis(sentences)
Obtaining the following result:
[{'label': '0', 'score': 0.9481984972953796},
{'label': '1', 'score': 0.9299975037574768},
{'label': '5', 'score': 0.9543816447257996}]