bhadresh-savani commited on
Commit
bb1cf3c
1 Parent(s): 02af272

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +69 -0
README.md ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ thumbnail: https://avatars3.githubusercontent.com/u/32437151?s=460&u=4ec59abc8d21d5feea3dab323d23a5860e6996a4&v=4
5
+ tags:
6
+ - text-classification
7
+ - emotion
8
+ - pytorch
9
+ license: apache-2.0
10
+ datasets:
11
+ - emotion
12
+ metrics:
13
+ - Accuracy, F1 Score
14
+ ---
15
+ # Distilbert-base-uncased-emotion
16
+
17
+ ## Model description:
18
+
19
+ ## Model Performance Comparision on Emotion Dataset from Twitter:
20
+
21
+ | Model | Accuracy | F1 Score | Test Sample per Second |
22
+ | --- | --- | --- | --- |
23
+ | [Distilbert-base-uncased-emotion](https://huggingface.co/bhadresh-savani/distilbert-base-uncased-emotion) | 93.8 | 93.79 | 398.69 |
24
+ | [Bert-base-uncased-emotion](https://huggingface.co/bhadresh-savani/bert-base-uncased-emotion) | 94.05 | 94.06 | 190.152 |
25
+ | [Roberta-base-emotion](https://huggingface.co/bhadresh-savani/roberta-base-emotion) | 93.95 | 93.97| 195.639 |
26
+ | [Albert-base-v2-emotion](https://huggingface.co/bhadresh-savani/albert-base-v2-emotion) | 93.6 | 93.65 | 182.794 |
27
+ | [Electra-base-emotion](https://huggingface.co/bhadresh-savani/electra-base-emotion) | 91.95 | 91.90 | 472.72 |
28
+
29
+ ## How to Use the model:
30
+ ```python
31
+ from transformers import pipeline
32
+ classifier = pipeline("text-classification",model='bhadresh-savani/electra-base-emotion', return_all_scores=True)
33
+ prediction = classifier("I love using transformers. The best part is wide range of support and its easy to use", )
34
+ print(prediction)
35
+
36
+ """
37
+ Output:
38
+ [[
39
+ {'label': 'sadness', 'score': 0.0006792712374590337},
40
+ {'label': 'joy', 'score': 0.9959300756454468},
41
+ {'label': 'love', 'score': 0.0009452480007894337},
42
+ {'label': 'anger', 'score': 0.0018055217806249857},
43
+ {'label': 'fear', 'score': 0.00041110432357527316},
44
+ {'label': 'surprise', 'score': 0.0002288572577526793}
45
+ ]]
46
+ """
47
+ ```
48
+
49
+ ## Dataset:
50
+ [Twitter-Sentiment-Analysis](https://huggingface.co/nlp/viewer/?dataset=emotion).
51
+
52
+ ## Training procedure
53
+ [Colab Notebook](https://github.com/bhadreshpsavani/ExploringSentimentalAnalysis/blob/main/SentimentalAnalysisWithDistilbert.ipynb)
54
+
55
+ ## Eval results
56
+ ```json
57
+ {
58
+ 'epoch': 8.0,
59
+ 'eval_accuracy': 0.9195,
60
+ 'eval_f1': 0.918975455617076,
61
+ 'eval_loss': 0.3486028015613556,
62
+ 'eval_runtime': 4.2308,
63
+ 'eval_samples_per_second': 472.726,
64
+ 'eval_steps_per_second': 7.564
65
+ }
66
+ ```
67
+
68
+ ## Reference:
69
+ * [Natural Language Processing with Transformer By Lewis Tunstall, Leandro von Werra, Thomas Wolf](https://learning.oreilly.com/library/view/natural-language-processing/9781098103231/)