Commit
•
39080e0
1
Parent(s):
e99a4b9
Update README.md
Browse files
README.md
CHANGED
@@ -2,15 +2,33 @@
|
|
2 |
tags: autonlp
|
3 |
language: en
|
4 |
widget:
|
5 |
-
- text: "I
|
6 |
datasets:
|
7 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
---
|
|
|
9 |
|
10 |
-
# Model Trained Using AutoNLP
|
11 |
|
12 |
- Problem type: Multi-class Classification
|
13 |
-
- Model ID: 3102256
|
14 |
|
15 |
## Validation Metrics
|
16 |
|
@@ -32,19 +50,18 @@ datasets:
|
|
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": "I love AutoNLP"}' https://api-inference.huggingface.co/models/philschmid/
|
36 |
```
|
37 |
|
38 |
Or Python API:
|
39 |
|
40 |
-
```
|
41 |
-
from transformers import AutoModelForSequenceClassification,
|
42 |
-
|
43 |
-
model = AutoModelForSequenceClassification.from_pretrained("philschmid/autonlp-banking77_vs_comprehend-3102256", use_auth_token=True)
|
44 |
-
|
45 |
-
tokenizer = AutoTokenizer.from_pretrained("philschmid/autonlp-banking77_vs_comprehend-3102256", use_auth_token=True)
|
46 |
|
47 |
-
|
|
|
48 |
|
49 |
-
|
|
|
|
|
50 |
```
|
|
|
2 |
tags: autonlp
|
3 |
language: en
|
4 |
widget:
|
5 |
+
- text: "I am still waiting on my card?"
|
6 |
datasets:
|
7 |
+
- banking77
|
8 |
+
model-index:
|
9 |
+
- name: RoBERTa-Banking77
|
10 |
+
results:
|
11 |
+
- task:
|
12 |
+
name: Text Classification
|
13 |
+
type: text-classification
|
14 |
+
dataset:
|
15 |
+
name: "BANKING77"
|
16 |
+
type: banking77
|
17 |
+
metrics:
|
18 |
+
- name: Accuracy
|
19 |
+
type: accuracy
|
20 |
+
value: 93.51
|
21 |
+
- name: Macro F1
|
22 |
+
type: macro-f1
|
23 |
+
value: 93.49
|
24 |
+
- name: Weighted F1
|
25 |
+
type: weighted-f1
|
26 |
+
value: 93.49
|
27 |
---
|
28 |
+
# `RoBERTa-Banking77` trained using autoNLP
|
29 |
|
|
|
30 |
|
31 |
- Problem type: Multi-class Classification
|
|
|
32 |
|
33 |
## Validation Metrics
|
34 |
|
|
|
50 |
You can use cURL to access this model:
|
51 |
|
52 |
```
|
53 |
+
$ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "I love AutoNLP"}' https://api-inference.huggingface.co/models/philschmid/RoBERTa-Banking77
|
54 |
```
|
55 |
|
56 |
Or Python API:
|
57 |
|
58 |
+
```py
|
59 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
|
|
|
|
|
|
|
|
|
60 |
|
61 |
+
model_id = 'philschmid/RoBERTa-Banking77'
|
62 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
63 |
|
64 |
+
model = AutoModelForSequenceClassification.from_pretrained(model_id)
|
65 |
+
classifier = pipeline('text-classification', tokenizer=tokenizer, model=model)
|
66 |
+
classifier('What is the base of the exchange rates?')
|
67 |
```
|