sharmax-vikas
commited on
Commit
•
18b7258
1
Parent(s):
c556e9d
Update README.md
Browse files
README.md
CHANGED
@@ -68,4 +68,18 @@ The following hyperparameters were used during training:
|
|
68 |
- Transformers 4.42.4
|
69 |
- Pytorch 2.3.1+cu121
|
70 |
- Datasets 2.20.0
|
71 |
-
- Tokenizers 0.19.1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
- Transformers 4.42.4
|
69 |
- Pytorch 2.3.1+cu121
|
70 |
- Datasets 2.20.0
|
71 |
+
- Tokenizers 0.19.1
|
72 |
+
|
73 |
+
## How to use
|
74 |
+
|
75 |
+
```py
|
76 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
|
77 |
+
|
78 |
+
ckpt = 'sharmax-vikas/bert-base-banking77-pt2'
|
79 |
+
tokenizer = AutoTokenizer.from_pretrained(ckpt)
|
80 |
+
model = AutoModelForSequenceClassification.from_pretrained(ckpt)
|
81 |
+
|
82 |
+
classifier = pipeline('text-classification', tokenizer=tokenizer, model=model)
|
83 |
+
classifier('What is the base of the exchange rates?')
|
84 |
+
# Output: [{'label': 'exchange_rate', 'score': 0.9961327314376831}]
|
85 |
+
```
|