philschmid's picture
philschmid
HF staff
Update README.md ea29fd4
1 ---
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
34 - Loss: 0.2988220155239105
35 - Accuracy: 0.9246753246753247
36 - Macro F1: 0.9246117406953515
37 - Micro F1: 0.9246753246753247
38 - Weighted F1: 0.9246117406953518
39 - Macro Precision: 0.9278163684429038
40 - Micro Precision: 0.9246753246753247
41 - Weighted Precision: 0.927816368442904
42 - Macro Recall: 0.9246753246753248
43 - Micro Recall: 0.9246753246753247
44 - Weighted Recall: 0.9246753246753247
45
46
47 ## Usage
48
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 ```