Update README.md
Browse files
README.md
CHANGED
@@ -3,31 +3,22 @@ language: en
|
|
3 |
tags:
|
4 |
- text-classification
|
5 |
- tensorflow
|
6 |
-
- roberta
|
7 |
-
datasets:
|
8 |
-
- go_emotions
|
9 |
license: mit
|
10 |
---
|
11 |
-
|
12 |
-
## What is the GoEmotions Dataset?
|
13 |
-
|
14 |
-
The dataset is comprised of 58000 Reddit comments with 28 emotions.
|
15 |
-
|
16 |
-
- admiration, amusement, anger, annoyance, approval, caring, confusion, curiosity, desire, disappointment, disapproval, disgust, embarrassment, excitement, fear, gratitude, grief, joy, love, nervousness, optimism, pride, realization, relief, remorse, sadness, surprise
|
17 |
## Usage
|
18 |
|
19 |
```python
|
20 |
|
21 |
from transformers import RobertaTokenizerFast, TFRobertaForSequenceClassification, pipeline
|
22 |
|
23 |
-
tokenizer = RobertaTokenizerFast.from_pretrained("cappuch/
|
24 |
-
model = TFRobertaForSequenceClassification.from_pretrained("cappuch/
|
25 |
|
26 |
-
|
27 |
-
model='cappuch/
|
28 |
|
29 |
-
|
30 |
-
print(
|
31 |
|
32 |
#[{'label': 'neutral', 'score': 0.9964383244514465}]
|
33 |
```
|
|
|
3 |
tags:
|
4 |
- text-classification
|
5 |
- tensorflow
|
|
|
|
|
|
|
6 |
license: mit
|
7 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
## Usage
|
9 |
|
10 |
```python
|
11 |
|
12 |
from transformers import RobertaTokenizerFast, TFRobertaForSequenceClassification, pipeline
|
13 |
|
14 |
+
tokenizer = RobertaTokenizerFast.from_pretrained("cappuch/Emotions_BERT")
|
15 |
+
model = TFRobertaForSequenceClassification.from_pretrained("cappuch/Emotions_BERT")
|
16 |
|
17 |
+
classific = pipeline('sentiment-analysis',
|
18 |
+
model='cappuch/Emotions_BERT')
|
19 |
|
20 |
+
labels = classific("Hello!")
|
21 |
+
print(labels)
|
22 |
|
23 |
#[{'label': 'neutral', 'score': 0.9964383244514465}]
|
24 |
```
|