rawsh commited on
Commit
d6054ae
1 Parent(s): 7394ed5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -62,11 +62,11 @@ class SentenceEmbeddingPipeline(Pipeline):
62
  return sentence_embeddings
63
 
64
  # load optimized model
65
- onnx_path = "./models/cos-v1-best/"
66
- model = ORTModelForFeatureExtraction.from_pretrained(onnx_path, file_name="model_quantized.onnx")
67
 
68
  # create optimized pipeline
69
- tokenizer = AutoTokenizer.from_pretrained(onnx_path, use_fast=True)
70
  optimized_emb = SentenceEmbeddingPipeline(model=model, tokenizer=tokenizer)
71
  pred1 = optimized_emb("Hello world!")
72
  pred2 = optimized_emb("I hate everything.")
 
62
  return sentence_embeddings
63
 
64
  # load optimized model
65
+ model_name = "rawsh/multi-qa-MiniLM-distill-onnx-L6-cos-v1"
66
+ model = ORTModelForFeatureExtraction.from_pretrained(model_name, file_name="model_quantized.onnx")
67
 
68
  # create optimized pipeline
69
+ tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=True)
70
  optimized_emb = SentenceEmbeddingPipeline(model=model, tokenizer=tokenizer)
71
  pred1 = optimized_emb("Hello world!")
72
  pred2 = optimized_emb("I hate everything.")