Update README.md
Browse files
README.md
CHANGED
|
@@ -52,7 +52,16 @@ The following hyperparameters were used during training:
|
|
| 52 |
|
| 53 |
### Loading the model
|
| 54 |
```
|
| 55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
|
| 57 |
```
|
| 58 |
|
|
|
|
| 52 |
|
| 53 |
### Loading the model
|
| 54 |
```
|
| 55 |
+
# Use a pipeline as a high-level helper
|
| 56 |
+
from transformers import pipeline
|
| 57 |
+
|
| 58 |
+
pipe = pipeline("token-classification", model="DeepNeural/ner_classifier_v2")
|
| 59 |
+
|
| 60 |
+
# Load model directly
|
| 61 |
+
from transformers import AutoTokenizer, AutoModelForTokenClassification
|
| 62 |
+
|
| 63 |
+
tokenizer = AutoTokenizer.from_pretrained("DeepNeural/ner_classifier_v2")
|
| 64 |
+
model = AutoModelForTokenClassification.from_pretrained("DeepNeural/ner_classifier_v2")
|
| 65 |
|
| 66 |
```
|
| 67 |
|