pistachio7
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -64,4 +64,18 @@ The following hyperparameters were used during training:
|
|
64 |
- Transformers 4.27.1
|
65 |
- Pytorch 2.4.1+cu121
|
66 |
- Datasets 2.9.0
|
67 |
-
- Tokenizers 0.13.3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
- Transformers 4.27.1
|
65 |
- Pytorch 2.4.1+cu121
|
66 |
- Datasets 2.9.0
|
67 |
+
- Tokenizers 0.13.3
|
68 |
+
|
69 |
+
## How to use
|
70 |
+
|
71 |
+
```py
|
72 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
|
73 |
+
|
74 |
+
ckpt = 'pistachio7/bert-base-banking77-pt2'
|
75 |
+
tokenizer = AutoTokenizer.from_pretrained(ckpt)
|
76 |
+
model = AutoModelForSequenceClassification.from_pretrained(ckpt)
|
77 |
+
|
78 |
+
classifier = pipeline('text-classification', tokenizer=tokenizer, model=model)
|
79 |
+
classifier('What is the base of the exchange rates?')
|
80 |
+
# Output: [{'label': 'exchange_rate', 'score': 0.9961327314376831}]
|
81 |
+
```
|