File size: 2,082 Bytes
edc1965
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f6e4429
edc1965
42f1818
edc1965
 
 
 
 
 
 
 
 
 
 
 
ce31b3b
edc1965
 
 
 
 
ce31b3b
 
 
 
 
 
edc1965
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
language: pl
tags:
  - text-classification
  - twitter
datasets:
  - datasets/tweet_eval
metrics:
  - f1
  - accuracy
  - precision
  - recall
widget:
  - text: "Nigdy przegrana nie sprawiła mi takiej radości. Szczęście i Opatrzność mają znaczenie Gratuluje @pzpn_pl"
    example_title: "Example 1"
  - text: "Osoby z Ukrainy zapłacą za życie w centrach pomocy? Sprzeczne prawem UE, niehumanitarne, okrutne."
    example_title: "Example 2"
---


# Twitter emotion PL (fast)

Twitter emotion PL (fast) is a model based on [distiluse](https://huggingface.co/sentence-transformers/distiluse-base-multilingual-cased-v1) for analyzing emotion of Polish twitter posts. It was trained on the translated version of [TweetEval](https://www.researchgate.net/publication/347233661_TweetEval_Unified_Benchmark_and_Comparative_Evaluation_for_Tweet_Classification) by Barbieri et al., 2020 for 10 epochs on single RTX3090 gpu.

The model will give you a four labels: joy, optimism, sadness and anger.

## How to use

You can use this model directly with a pipeline for text classification:

```python
from transformers import pipeline

nlp = pipeline("text-classification", model="bardsai/twitter-emotion-pl-fast")
nlp("Nigdy przegrana nie sprawiła mi takiej radości. Szczęście i Opatrzność mają znaczenie Gratuluje @pzpn_pl")
```
```bash
[{'label': 'joy', 'score': 0.7068771123886108}]
```

## Performance
| Metric | Value |
| --- | ----------- |
| f1 macro | 0.692 |
| precision macro | 0.700 |
| recall macro | 687 |
| accuracy | 0.737 |
| samples per second | 255.2 |


(The performance was evaluated on RTX 3090 gpu)

## Changelog
- 2023-07-19: Initial release

## About bards.ai

At bards.ai, we focus on providing machine learning expertise and skills to our partners, particularly in the areas of nlp, machine vision and time series analysis. Our team is located in Wroclaw, Poland. Please visit our website for more information: [bards.ai](https://bards.ai/)

Let us know if you use our model :). Also, if you need any help, feel free to contact us at info@bards.ai