readme: ---
  license: apache-2.0
  tags:
  - generated_from_trainer
  metrics:
  - accuracy
  - f1
  - precision
  - recall
  model-index:
  - name: models
    results: []
  language:
  - en
  ---
  
  <!-- This model card has been generated automatically according to the information the Trainer had access to. You
  should probably proofread and complete it, then remove this comment. -->
  
  # BERT-Emotion detection model 
  ____
  ## ⚙️ Model
  This model is a fine-tuned version of [bert-base-uncased](https://huggingface.co/bert-base-uncased) on the [Emotion Dataset from Kaggle](https://www.kaggle.com/datasets/praveengovi/emotions-dataset-for-nlp).
  It achieves the following results on the test set after being trained and evaluated with the Trainer interface:
  - Loss: 0.2362
  - Accuracy: 0.923
  - F1: 0.9226
  - Precision: 0.9226
  - Recall: 0.923
  
  ### 💡How to: Inference API
  Mapping of labels: 
  * 'anger': 0, 'fear': 1, 'joy': 2, 'love': 3, 'sadness': 4, 'surprise': 5
  
  ### Training hyperparameters
  
  The following hyperparameters were used during training:
  - learning_rate: 1e-05
  - train_batch_size: 64
  - eval_batch_size: 64
  - seed: 42
  - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  - lr_scheduler_type: linear
  - lr_scheduler_warmup_steps: 500
  - num_epochs: 3
  
  ### Training results
  
  | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1     | Precision | Recall |
  |:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|:---------:|:------:|
  | 1.5691        | 1.0   | 250  | 1.2681          | 0.564    | 0.4477 | 0.3868    | 0.564  |
  | 0.9132        | 2.0   | 500  | 0.4917          | 0.8465   | 0.8349 | 0.8508    | 0.8465 |
  | 0.3131        | 3.0   | 750  | 0.2362          | 0.923    | 0.9226 | 0.9226    | 0.923  |
  
  ## Model description
  
  More information needed
  
  ## Intended uses & limitations
  
  More information needed
  
  ## Training and evaluation data
  
  Training and evaluation data can be found on the same link as in the model description
  
  ## Training procedure
  
  
  ### Framework versions
  
  - Transformers 4.25.1
  - Pytorch 1.13.1+cu116
  - Tokenizers 0.13.2