File size: 4,118 Bytes
e1880fd
b2ac6e5
 
 
 
 
 
 
 
 
 
7722e88
cf27e6d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b2ac6e5
 
 
0db069f
 
acea346
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b2ac6e5
acea346
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b2ac6e5
 
acea346
 
 
11b6214
 
 
 
 
 
 
acea346
 
 
 
 
 
 
 
 
 
 
b2ac6e5
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
---
datasets:
- utkarsharora100/google_go_emotions_hindi_translated
language:
- hi
- en
metrics:
- accuracy
base_model:
- ai4bharat/indic-bert
pipeline_tag: text-classification
widget:
- text: बिजली जल्दी  गई, बहुत शुक्रिया
  output:
  - label: anger
    score: 0.0046975212171673775
  - label: disgust
    score: 0.0031991226132959127
  - label: fear
    score: 0.0033638915047049522
  - label: joy
    score: 0.7621134519577026
  - label: neutral
    score: 0.21544277667999268
  - label: sadness
    score: 0.21544277667999268
  - label: surprise
    score: 0.008416484110057354
license: mit
tags:
- transformers
- pytorch
---
---


      
metrics: 
  - accuracy: 0.8085
  - precision: 0.7996
  - recall: 0.8085
  - f1: 0.7983
  - confusion_matrix:
      anger: [2, 0, 0, 1, 2, 0]
      disgust: [0, 1, 0, 0, 0, 0]
      joy: [0, 0, 6, 0, 0, 0]
      surprise: [0, 0, 0, 3, 1, 0]
      neutral: [1, 0, 1, 0, 23, 1]
      sadness: [0, 0, 0, 0, 2, 3]
  - classification_report:
      anger:
        precision: 0.67
        recall: 0.40
        f1-score: 0.50
        support: 5
      disgust:
        precision: 1.00
        recall: 1.00
        f1-score: 1.00
        support: 1
      joy:
        precision: 0.86
        recall: 1.00
        f1-score: 0.92
        support: 6
      surprise:
        precision: 0.82
        recall: 0.88
        f1-score: 0.85
        support: 26
      neutral:
        precision: 0.75
        recall: 0.60
        f1-score: 0.67
        support: 5
      sadness:
        precision: 0.75
        recall: 0.75
        f1-score: 0.75
        support: 4
      weighted_avg:
        precision: 0.80
        recall: 0.81
        f1-score: 0.80
        support: 47

model_name: "vashuag/HindiEmotion"

tags:
  - emotion-detection
  - hindi
  - huggingface
  - text-classification

training:
  - epochs: 10
  - batch_size: 16
  - learning_rate: 1e-5

resources:
  - colab_demo: "https://colab.research.google.com/drive/1OaXK2L-2A7adFv-lcEDHcHwKiR22O3Je?usp=sharing"
  - kaggle_notebook: "https://www.kaggle.com/code/vashuagarwal/emotion-indicbert"


        
summary: |
  The model achieved its best performance on Epoch 5, with an accuracy of 0.6997, F1 score of 0.6750, precision of 0.6761, recall of 0.6997, and ROC AUC of 0.8207. 
  The model shows stable performance across later epochs, with slight fluctuations in metrics but generally consistent results.
  Summary
The Hindi Emotion Classification Model uses the Indic-BERT architecture to classify emotions in Hindi text, achieving an overall accuracy of approximately 80.85% on a random test dataset. It analyzes input sentences and categorizes them into emotions like joy, anger, sadness, and more, providing score metrics for each detected emotion.

Explanation
This model processes Hindi text and applies powerful machine learning strategies to classify emotions effectively. For example, when given the input "बिजली जल्दी आ गई, बहुत शुक्रिया" (translated as "The electricity came quickly, thank you"), it produces scores that indicate the likelihood of various emotions. In this case, the model suggests a strong presence of joy (about 76%) while also noting some neutral and sadness scores.

By leveraging datasets such as google_go_emotions_hindi_translated, the model learns from diverse emotional expressions in Hindi, ensuring it can handle a variety of contexts effectively. The comprehensive metrics, including precision, recall, and F1 scores, confirm its reliability for practical applications in areas like sentiment analysis and customer feedback. This functionality enables users to better understand emotional subtleties in Hindi communications.

usage: |
  ```python
  from transformers import pipeline

  # Load the model pipeline
  emotion_model = pipeline("text-classification", model="vashuag/HindiEmotion", return_all_scores=True)

  # Example prediction
  text = "आप बहुत अच्छे हैं"  # Translation: "You are very good."
  predictions = emotion_model(text)
  print(predictions)