Commit
·
f72d0aa
1
Parent(s):
fe2b41d
Update README.md
Browse files
README.md
CHANGED
|
@@ -27,8 +27,8 @@ tokenizer = AutoTokenizer.from_pretrained('Deepchecks/roberta_toxicity_classifie
|
|
| 27 |
model = ORTModelForSequenceClassification.from_pretrained('Deepchecks/roberta_toxicity_classifier_onnx')
|
| 28 |
|
| 29 |
# prepare the pipeline and generate inferences
|
| 30 |
-
pip = pipeline(task='text-classification', model=
|
| 31 |
-
res = pip(
|
| 32 |
|
| 33 |
```
|
| 34 |
|
|
|
|
| 27 |
model = ORTModelForSequenceClassification.from_pretrained('Deepchecks/roberta_toxicity_classifier_onnx')
|
| 28 |
|
| 29 |
# prepare the pipeline and generate inferences
|
| 30 |
+
pip = pipeline(task='text-classification', model=model, tokenizer=tokenizer, device=device, accelerator="ort")
|
| 31 |
+
res = pip(['I hate you', 'I love you'], batch_size=64, truncation="only_first")
|
| 32 |
|
| 33 |
```
|
| 34 |
|