Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: vi
|
3 |
+
tags:
|
4 |
+
- emotion-recognition
|
5 |
+
- vietnamese
|
6 |
+
- bartpho
|
7 |
+
license: apache-2.0
|
8 |
+
datasets:
|
9 |
+
- VSMEC
|
10 |
+
metrics:
|
11 |
+
- accuracy
|
12 |
+
- f1
|
13 |
+
model-index:
|
14 |
+
- name: bartpho-emotion
|
15 |
+
results:
|
16 |
+
- task:
|
17 |
+
type: text-classification
|
18 |
+
name: Emotion Recognition
|
19 |
+
dataset:
|
20 |
+
name: VSMEC
|
21 |
+
type: custom
|
22 |
+
metrics:
|
23 |
+
- name: Accuracy
|
24 |
+
type: accuracy
|
25 |
+
value: <INSERT_ACCURACY>
|
26 |
+
- name: F1 Score
|
27 |
+
type: f1
|
28 |
+
value: <INSERT_F1_SCORE>
|
29 |
+
base_model:
|
30 |
+
- vinai/bartpho-syllable
|
31 |
+
pipeline_tag: text-classification
|
32 |
+
---
|
33 |
+
|
34 |
+
# bartpho-emotion: Emotion Recognition for Vietnamese Text
|
35 |
+
|
36 |
+
This model is a fine-tuned version of [`vinai/bartpho-syllable`](https://huggingface.co/vinai/bartpho-syllable) on the **VSMEC** dataset for emotion recognition in Vietnamese text. It achieves state-of-the-art performance on this task.
|
37 |
+
|
38 |
+
## Model Details
|
39 |
+
|
40 |
+
- **Base Model**: [`vinai/bartpho-syllable`](https://huggingface.co/vinai/bartpho-syllable)
|
41 |
+
- **Dataset**: [VSMEC](https://github.com/uitnlp/vsmec) (Vietnamese Social Media Emotion Corpus)
|
42 |
+
- **Fine-tuning Framework**: HuggingFace Transformers
|
43 |
+
- **Hyperparameters**:
|
44 |
+
- Batch size: `32`
|
45 |
+
- Learning rate: `5e-5`
|
46 |
+
- Epochs: `100`
|
47 |
+
- Max sequence length: `256`
|
48 |
+
|
49 |
+
## Dataset
|
50 |
+
|
51 |
+
The model was trained on the **VSMEC** dataset, which contains Vietnamese social media text annotated with emotion labels. The dataset includes the following emotion categories: `<INSERT_LABELS>`.
|
52 |
+
|
53 |
+
## Results
|
54 |
+
|
55 |
+
The model was evaluated using the following metrics:
|
56 |
+
|
57 |
+
- **Accuracy**: `<INSERT_ACCURACY>`
|
58 |
+
- **F1 Score**: `<INSERT_F1_SCORE>`
|
59 |
+
|
60 |
+
## Usage
|
61 |
+
|
62 |
+
You can use this model for emotion recognition in Vietnamese text. Below is an example of how to use it with the HuggingFace Transformers library:
|
63 |
+
|
64 |
+
```python
|
65 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
66 |
+
|
67 |
+
tokenizer = AutoTokenizer.from_pretrained("visolex/bartpho-emotion")
|
68 |
+
model = AutoModelForSequenceClassification.from_pretrained("visolex/bartpho-emotion")
|
69 |
+
|
70 |
+
text = "T么i r岷 vui v矛 h么m nay tr峄漣 膽岷筽!"
|
71 |
+
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=256)
|
72 |
+
outputs = model(**inputs)
|
73 |
+
predicted_class = outputs.logits.argmax(dim=-1).item()
|
74 |
+
|
75 |
+
print(f"Predicted emotion: {predicted_class}")
|