transformers safetensors albert text-classification pytorch hi en dataset:utkarsharora100/google_go_emotions_hindi_translated base_model:ai4bharat/indic-bert base_model:finetune:ai4bharat/indic-bert license:mit autotrain_compatible endpoints_compatible region:us
---
base_model:
- ai4bharat/indic-bert
datasets:
- utkarsharora100/google_go_emotions_hindi_translated
language:
- hi
- en
license: mit
metrics:
- accuracy
pipeline_tag: text-classification
tags:
- transformers
- pytorch
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
---
---


      
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)