Commit
·
28b495c
1
Parent(s):
5a66789
Update README.md
Browse files
README.md
CHANGED
@@ -2,15 +2,31 @@
|
|
2 |
tags: autonlp
|
3 |
language: en
|
4 |
widget:
|
5 |
-
- text: "
|
6 |
datasets:
|
7 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
---
|
9 |
-
|
10 |
-
# Model Trained Using AutoNLP
|
11 |
-
|
12 |
- Problem type: Multi-class Classification
|
13 |
-
- Model ID: 3092243
|
14 |
|
15 |
## Validation Metrics
|
16 |
|
@@ -26,25 +42,24 @@ datasets:
|
|
26 |
- Micro Recall: 0.8099929627023223
|
27 |
- Weighted Recall: 0.8099929627023223
|
28 |
|
29 |
-
|
30 |
## Usage
|
31 |
|
32 |
You can use cURL to access this model:
|
33 |
|
34 |
```
|
35 |
-
$ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "
|
36 |
```
|
37 |
|
38 |
Or Python API:
|
39 |
|
40 |
-
```
|
41 |
-
from transformers import AutoModelForSequenceClassification,
|
42 |
-
|
43 |
-
model = AutoModelForSequenceClassification.from_pretrained("philschmid/autonlp-tweet_eval_vs_comprehend-3092243", use_auth_token=True)
|
44 |
|
45 |
-
|
46 |
|
47 |
-
|
|
|
48 |
|
49 |
-
|
|
|
50 |
```
|
|
|
2 |
tags: autonlp
|
3 |
language: en
|
4 |
widget:
|
5 |
+
- text: "Worry is a down payment on a problem you may never have'. Joyce Meyer. #motivation #leadership #worry"
|
6 |
datasets:
|
7 |
+
- banking77
|
8 |
+
model-index:
|
9 |
+
- name: BERT-tweet-eval-emotion
|
10 |
+
results:
|
11 |
+
- task:
|
12 |
+
name: Sentiment Analysis
|
13 |
+
type: sentiment-analysis
|
14 |
+
dataset:
|
15 |
+
name: "tweeteval"
|
16 |
+
type: tweet-eval
|
17 |
+
metrics:
|
18 |
+
- name: Accuracy
|
19 |
+
type: accuracy
|
20 |
+
value: 81.00
|
21 |
+
- name: Macro F1
|
22 |
+
type: macro-f1
|
23 |
+
value: 77.37
|
24 |
+
- name: Weighted F1
|
25 |
+
type: weighted-f1
|
26 |
+
value: 80.63
|
27 |
---
|
28 |
+
# `BERT-tweet-eval-emotion` trained using autoNLP
|
|
|
|
|
29 |
- Problem type: Multi-class Classification
|
|
|
30 |
|
31 |
## Validation Metrics
|
32 |
|
|
|
42 |
- Micro Recall: 0.8099929627023223
|
43 |
- Weighted Recall: 0.8099929627023223
|
44 |
|
|
|
45 |
## Usage
|
46 |
|
47 |
You can use cURL to access this model:
|
48 |
|
49 |
```
|
50 |
+
$ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "Worry is a down payment on a problem you may never have'. Joyce Meyer. #motivation #leadership #worry"}' https://api-inference.huggingface.co/models/philschmid/BERT-tweet-eval-emotion
|
51 |
```
|
52 |
|
53 |
Or Python API:
|
54 |
|
55 |
+
```py
|
56 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
|
|
|
|
|
57 |
|
58 |
+
model_id = 'philschmid/BERT-tweet-eval-emotion'
|
59 |
|
60 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
61 |
+
model = AutoModelForSequenceClassification.from_pretrained(model_id)
|
62 |
|
63 |
+
classifier = pipeline('text-classification', tokenizer=tokenizer, model=model)
|
64 |
+
classifier("Worry is a down payment on a problem you may never have'. Joyce Meyer. #motivation #leadership #worry")
|
65 |
```
|