Update README.md
Browse files
README.md
CHANGED
|
@@ -61,10 +61,15 @@ from transformers import AutoTokenizer
|
|
| 61 |
import numpy as np
|
| 62 |
import scipy.special
|
| 63 |
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
|
| 69 |
# Prepare text
|
| 70 |
text = "Congratulations! You've won a $1000 gift card. Click now!"
|
|
|
|
| 61 |
import numpy as np
|
| 62 |
import scipy.special
|
| 63 |
|
| 64 |
+
REPO_ID = "SharpWoofer/distilroberta-sms-spam-detector-onnx-quantized"
|
| 65 |
+
ONNX_MODEL_NAME = "model.quant.onnx"
|
| 66 |
+
|
| 67 |
+
model_path = hf_hub_download(repo_id=REPO_ID, filename=ONNX_MODEL_NAME)
|
| 68 |
+
|
| 69 |
+
# Load the tokenizer from the same repository
|
| 70 |
+
tokenizer = AutoTokenizer.from_pretrained(REPO_ID)
|
| 71 |
+
|
| 72 |
+
session = ort.InferenceSession(model_path)
|
| 73 |
|
| 74 |
# Prepare text
|
| 75 |
text = "Congratulations! You've won a $1000 gift card. Click now!"
|