philschmid HF staff commited on
Commit
2dce64c
1 Parent(s): 1561114

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +27 -11
README.md CHANGED
@@ -2,9 +2,28 @@
2
  tags: autotrain
3
  language: en
4
  widget:
5
- - text: "I love AutoTrain 🤗"
6
  datasets:
7
- - philschmid/autotrain-data-does-it-work
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  co2_eq_emissions: 5.632805352029529
9
  ---
10
 
@@ -40,13 +59,10 @@ $ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: applica
40
  Or Python API:
41
 
42
  ```
43
- from transformers import AutoModelForSequenceClassification, AutoTokenizer
44
-
45
- model = AutoModelForSequenceClassification.from_pretrained("philschmid/autotrain-does-it-work-940131045", use_auth_token=True)
46
-
47
- tokenizer = AutoTokenizer.from_pretrained("philschmid/autotrain-does-it-work-940131045", use_auth_token=True)
48
-
49
- inputs = tokenizer("I love AutoTrain", return_tensors="pt")
50
-
51
- outputs = model(**inputs)
52
  ```
2
  tags: autotrain
3
  language: en
4
  widget:
5
+ - text: "I am still waiting on my card?"
6
  datasets:
7
+ - banking77
8
+ model-index:
9
+ - name: BERT-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: 91.99
21
+ - name: Macro F1
22
+ type: macro-f1
23
+ value: 91.99
24
+ - name: Weighted F1
25
+ type: weighted-f1
26
+ value: 91.99
27
  co2_eq_emissions: 5.632805352029529
28
  ---
29
 
59
  Or Python API:
60
 
61
  ```
62
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
63
+ model_id = 'philschmid/DistilBERT-Banking77'
64
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
65
+ model = AutoModelForSequenceClassification.from_pretrained(model_id)
66
+ classifier = pipeline('text-classification', tokenizer=tokenizer, model=model)
67
+ classifier('What is the base of the exchange rates?')
 
 
 
68
  ```