Update README.md
Browse files
README.md
CHANGED
|
@@ -28,8 +28,8 @@ python -m pip install optimum[onnxruntime]@git+https://github.com/huggingface/op
|
|
| 28 |
from optimum.onnxruntime import ORTModelForSequenceClassification
|
| 29 |
from transformers import AutoTokenizer, pipeline
|
| 30 |
|
| 31 |
-
model = ORTModelForSequenceClassification.from_pretrained('
|
| 32 |
-
tokenizer = AutoTokenizer.from_pretrained('
|
| 33 |
|
| 34 |
pipe = pipeline(task='text-classification', model=model, tokenizer=tokenizer, )
|
| 35 |
texts = ["that's wrong", "can you please answer me?"]
|
|
|
|
| 28 |
from optimum.onnxruntime import ORTModelForSequenceClassification
|
| 29 |
from transformers import AutoTokenizer, pipeline
|
| 30 |
|
| 31 |
+
model = ORTModelForSequenceClassification.from_pretrained('minuva/MiniLMv2-userflow-v2-onnx', provider="CPUExecutionProvider")
|
| 32 |
+
tokenizer = AutoTokenizer.from_pretrained('minuva/MiniLMv2-userflow-v2-onnx', use_fast=True, model_max_length=256, truncation=True, padding='max_length')
|
| 33 |
|
| 34 |
pipe = pipeline(task='text-classification', model=model, tokenizer=tokenizer, )
|
| 35 |
texts = ["that's wrong", "can you please answer me?"]
|