Update README.md
Browse files
README.md
CHANGED
|
@@ -9,15 +9,14 @@ This model is the dynamically quantized version of the model
|
|
| 9 |
(https://akdeniz27/bert-base-turkish-cased-ner)
|
| 10 |
|
| 11 |
# How to use:
|
| 12 |
-
|
|
|
|
| 13 |
!pip install "optimum[onnxruntime]"
|
| 14 |
|
| 15 |
-
and import "ORTModelForTokenClassification":
|
| 16 |
-
|
| 17 |
from transformers import AutoTokenizer, pipeline
|
| 18 |
from optimum.onnxruntime import ORTModelForTokenClassification
|
| 19 |
|
| 20 |
-
```
|
| 21 |
model = ORTModelForTokenClassification.from_pretrained("akdeniz27/bert-base-turkish-cased-ner-quantized", file_name="model_quantized.onnx")
|
| 22 |
tokenizer = AutoTokenizer.from_pretrained("akdeniz27/bert-base-turkish-cased-ner-quantized")
|
| 23 |
ner = pipeline('ner', model=model, tokenizer=tokenizer, aggregation_strategy="first")
|
|
|
|
| 9 |
(https://akdeniz27/bert-base-turkish-cased-ner)
|
| 10 |
|
| 11 |
# How to use:
|
| 12 |
+
```
|
| 13 |
+
# First install "optimum[onnxruntime]":
|
| 14 |
!pip install "optimum[onnxruntime]"
|
| 15 |
|
| 16 |
+
# and import "ORTModelForTokenClassification":
|
|
|
|
| 17 |
from transformers import AutoTokenizer, pipeline
|
| 18 |
from optimum.onnxruntime import ORTModelForTokenClassification
|
| 19 |
|
|
|
|
| 20 |
model = ORTModelForTokenClassification.from_pretrained("akdeniz27/bert-base-turkish-cased-ner-quantized", file_name="model_quantized.onnx")
|
| 21 |
tokenizer = AutoTokenizer.from_pretrained("akdeniz27/bert-base-turkish-cased-ner-quantized")
|
| 22 |
ner = pipeline('ner', model=model, tokenizer=tokenizer, aggregation_strategy="first")
|