Commit
·
078cc55
1
Parent(s):
01d208f
Update README.md
Browse files
README.md
CHANGED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
# bert-base-uncased-emotion
|
| 16 |
+
|
| 17 |
+
## Model description:
|
| 18 |
+
`bert-base-uncased` finetuned on the emotion dataset using HuggingFace Trainer.
|
| 19 |
+
```
|
| 20 |
+
learning rate 2e-5,
|
| 21 |
+
batch size 64,
|
| 22 |
+
num_train_epochs=8,
|
| 23 |
+
```
|
| 24 |
+
|
| 25 |
+
## How to Use the model:
|
| 26 |
+
```python
|
| 27 |
+
from transformers import pipeline
|
| 28 |
+
classifier = pipeline("sentiment-analysis",model='bhadresh-savani/bert-base-uncased-emotion')
|
| 29 |
+
prediction = classifier("I love using transformers. The best part is wide range of support and its easy to use")
|
| 30 |
+
```
|
| 31 |
+
|
| 32 |
+
## Dataset:
|
| 33 |
+
[Twitter-Sentiment-Analysis](https://huggingface.co/nlp/viewer/?dataset=emotion).
|
| 34 |
+
|
| 35 |
+
## Training procedure
|
| 36 |
+
[Colab Notebook](https://github.com/bhadreshpsavani/ExploringSentimentalAnalysis/blob/main/SentimentalAnalysisWithDistilbert.ipynb)
|
| 37 |
+
|
| 38 |
+
## Eval results
|
| 39 |
+
```
|
| 40 |
+
{
|
| 41 |
+
'test_accuracy': 0.9355,
|
| 42 |
+
'test_f1': 0.9354074792391709,
|
| 43 |
+
'test_loss': 0.18557891249656677,
|
| 44 |
+
'test_runtime': 11.0092,
|
| 45 |
+
'test_samples_per_second': 181.666,
|
| 46 |
+
'test_steps_per_second': 2.907
|
| 47 |
+
}
|
| 48 |
+
```
|