Create README.md
Browse files
README.md
CHANGED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
language:
|
4 |
+
- en
|
5 |
+
metrics:
|
6 |
+
- accuracy
|
7 |
+
- f1
|
8 |
+
pipeline_tag: text-classification
|
9 |
+
---
|
10 |
+
|
11 |
+
```python
|
12 |
+
# transformers==4.29.1
|
13 |
+
|
14 |
+
from transformers import AutoTokenizer, pipeline
|
15 |
+
from optimum.onnxruntime import ORTModelForSequenceClassification
|
16 |
+
|
17 |
+
onnx_model_path = "kevinng77/unsup_bert_L3"
|
18 |
+
tokenizer = AutoTokenizer.from_pretrained(onnx_model_path)
|
19 |
+
|
20 |
+
onnx_model = ORTModelForSequenceClassification.from_pretrained(onnx_model_path)
|
21 |
+
onnx_pipe = pipeline(task="text-classification", model=onnx_model, tokenizer=tokenizer)
|
22 |
+
onnx_pipe("How many rows are there in the table?")
|
23 |
+
|
24 |
+
```
|
25 |
+
|
26 |
+
|