Views
No views yet
| Parameter | |
|---|---|
| Learning rate | 5e-5 |
| Epochs | 10 |
| Max Seq Length | 50 |
| Batch size | 16 |
| Warmup Proportion | 0.1 |
| Epsilon | 1e-8 |
Macro F1 - 49.30%1
2from transformers import RobertaTokenizerFast, TFRobertaForSequenceClassification, pipeline
3
4tokenizer = RobertaTokenizerFast.from_pretrained("arpanghoshal/EmoRoBERTa")
5model = TFRobertaForSequenceClassification.from_pretrained("arpanghoshal/EmoRoBERTa")
6
7emotion = pipeline('sentiment-analysis',
8 model='arpanghoshal/EmoRoBERTa')
9
10emotion_labels = emotion("Thanks for using it.")
11print(emotion_labels)
12[{'label': 'gratitude', 'score': 0.9964383244514465}]