Update README.md
Browse files
README.md
CHANGED
@@ -10,4 +10,18 @@ widget:
|
|
10 |
- text: "How long until my transfer goes through?"
|
11 |
---
|
12 |
# distilroberta-base fine-tuned on banking77 dataset for intent classification
|
13 |
-
Test set accuray: 0.896
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
- text: "How long until my transfer goes through?"
|
11 |
---
|
12 |
# distilroberta-base fine-tuned on banking77 dataset for intent classification
|
13 |
+
Test set accuray: 0.896
|
14 |
+
|
15 |
+
## How to use
|
16 |
+
|
17 |
+
```py
|
18 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
|
19 |
+
|
20 |
+
ckpt = 'mrm8488/distilroberta-finetuned-banking77'
|
21 |
+
tokenizer = AutoTokenizer.from_pretrained(ckpt)
|
22 |
+
model = AutoModelForSequenceClassification.from_pretrained(ckpt)
|
23 |
+
|
24 |
+
classifier = pipeline('text-classification', tokenizer=tokenizer, model=model)
|
25 |
+
classifier('What is the base of the exchange rates?')
|
26 |
+
# Output: [{'label': 'exchange_rate', 'score': 0.8509947657585144}]
|
27 |
+
```
|