SharpWoofer commited on
Commit
7f5d7a9
·
verified ·
1 Parent(s): 5689357

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +9 -4
README.md CHANGED
@@ -61,10 +61,15 @@ from transformers import AutoTokenizer
61
  import numpy as np
62
  import scipy.special
63
 
64
- # Load the tokenizer
65
- tokenizer = AutoTokenizer.from_pretrained("SharpWoofer/distilroberta-sms-spam-detector-onnx-quantized")
66
- # Load the ONNX session
67
- session = ort.InferenceSession("path/to/your/model.quant.onnx")
 
 
 
 
 
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!"