philschmid commited on
Commit
ea29fd4
1 Parent(s): 3b718e5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +30 -13
README.md CHANGED
@@ -2,15 +2,32 @@
2
  tags: autonlp
3
  language: en
4
  widget:
5
- - text: "I love AutoNLP 🤗"
6
  datasets:
7
- - philschmid/autonlp-data-banking77_vs_comprehend
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  ---
9
-
10
- # Model Trained Using AutoNLP
11
 
12
  - Problem type: Multi-class Classification
13
- - Model ID: 3102252
14
 
15
  ## Validation Metrics
16
 
@@ -32,19 +49,19 @@ 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/autonlp-banking77_vs_comprehend-3102252
36
  ```
37
 
38
  Or Python API:
39
 
40
- ```
41
- from transformers import AutoModelForSequenceClassification, AutoTokenizer
42
-
43
- model = AutoModelForSequenceClassification.from_pretrained("philschmid/autonlp-banking77_vs_comprehend-3102252", use_auth_token=True)
44
 
45
- tokenizer = AutoTokenizer.from_pretrained("philschmid/autonlp-banking77_vs_comprehend-3102252", use_auth_token=True)
46
 
47
- inputs = tokenizer("I love AutoNLP", return_tensors="pt")
 
48
 
49
- outputs = model(**inputs)
 
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: DistilBERT-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: 92.47
21
+ - name: Macro F1
22
+ type: macro-f1
23
+ value: 92.46
24
+ - name: Weighted F1
25
+ type: weighted-f1
26
+ value: 92.46
27
  ---
28
+ # `DistilBERT-Banking77` trained using autoNLP
 
29
 
30
  - Problem type: Multi-class Classification
 
31
 
32
  ## Validation Metrics
33
 
49
  You can use cURL to access this model:
50
 
51
  ```
52
+ $ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "What is the base of the exchange rates?"}' https://api-inference.huggingface.co/models/philschmid/DistilBERT
53
  ```
54
 
55
  Or Python API:
56
 
57
+ ```py
58
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
 
 
59
 
60
+ model_id = 'philschmid/DistilBERT-Banking77'
61
 
62
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
63
+ model = AutoModelForSequenceClassification.from_pretrained(model_id)
64
 
65
+ classifier = pipeline('text-classification', tokenizer=tokenizer, model=model)
66
+ classifier('What is the base of the exchange rates?')
67
  ```