AnnyNguyen commited on
Commit
90460fb
verified
1 Parent(s): 9132252

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +69 -4
README.md CHANGED
@@ -1,11 +1,76 @@
1
  ---
 
 
 
 
 
 
2
  datasets:
3
- - visolex/UIT-VSMEC
4
- language:
5
- - vi
6
  metrics:
7
  - accuracy
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  base_model:
9
  - vinai/phobert-base
10
  pipeline_tag: text-classification
11
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language: vi
3
+ tags:
4
+ - emotion-recognition
5
+ - vietnamese
6
+ - phobert
7
+ license: apache-2.0
8
  datasets:
9
+ - VSMEC
 
 
10
  metrics:
11
  - accuracy
12
+ - f1
13
+ model-index:
14
+ - name: phobert-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/phobert-base
31
  pipeline_tag: text-classification
32
+ ---
33
+
34
+ # PhoBERT-Emotion: Emotion Recognition for Vietnamese Text
35
+
36
+ This model is a fine-tuned version of [`vinai/phobert-base`](https://huggingface.co/vinai/phobert-base) on the **VSMEC** dataset for emotion recognition in Vietnamese text. It achieves competitive performance on this task.
37
+
38
+ ## Model Details
39
+
40
+ - **Base Model**: [`vinai/phobert-base`](https://huggingface.co/vinai/phobert-base)
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:
52
+ `{"Anger": 0, "Disgust": 1, "Enjoyment": 2, "Fear": 3, "Other": 4, "Sadness": 5, "Surprise": 6}`.
53
+
54
+ ## Results
55
+
56
+ The model was evaluated using the following metrics:
57
+
58
+ - **Accuracy**: `<INSERT_ACCURACY>`
59
+ - **F1 Score**: `<INSERT_F1_SCORE>`
60
+
61
+ ## Usage
62
+
63
+ 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:
64
+
65
+ ```python
66
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
67
+
68
+ tokenizer = AutoTokenizer.from_pretrained("visolex/phobert-emotion")
69
+ model = AutoModelForSequenceClassification.from_pretrained("visolex/phobert-emotion")
70
+
71
+ text = "T么i r岷 vui v矛 h么m nay tr峄漣 膽岷筽!"
72
+ inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=256)
73
+ outputs = model(**inputs)
74
+ predicted_class = outputs.logits.argmax(dim=-1).item()
75
+
76
+ print(f"Predicted emotion: {predicted_class}")