Update README.md
Browse files
README.md
CHANGED
@@ -10,6 +10,13 @@ This model is the dynamically quantized version of the model
|
|
10 |
|
11 |
# How to use:
|
12 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
model_onnx = ORTModelForTokenClassification.from_pretrained("akdeniz27/convbert-base-turkish-cased-ner-quantized", file_name="model_quantized.onnx")
|
14 |
tokenizer = AutoTokenizer.from_pretrained("akdeniz27/convbert-base-turkish-cased-ner-quantized")
|
15 |
ner = pipeline('ner', model=model, tokenizer=tokenizer, aggregation_strategy="first")
|
|
|
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_onnx = ORTModelForTokenClassification.from_pretrained("akdeniz27/convbert-base-turkish-cased-ner-quantized", file_name="model_quantized.onnx")
|
21 |
tokenizer = AutoTokenizer.from_pretrained("akdeniz27/convbert-base-turkish-cased-ner-quantized")
|
22 |
ner = pipeline('ner', model=model, tokenizer=tokenizer, aggregation_strategy="first")
|