Update handler.py
Browse files- handler.py +1 -1
handler.py
CHANGED
@@ -20,7 +20,7 @@ class EndpointHandler():
|
|
20 |
# self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
21 |
task = "feature-extraction"
|
22 |
tokenizer = AutoTokenizer.from_pretrained('sentence-transformers/msmarco-MiniLM-L-6-v3')
|
23 |
-
model_regular = ORTModelForFeatureExtraction.from_pretrained(
|
24 |
self.onnx_extractor = pipeline(task, model=model_regular, tokenizer=tokenizer)
|
25 |
# self.model.to(self.device)
|
26 |
# print("model will run on ", self.device)
|
|
|
20 |
# self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
21 |
task = "feature-extraction"
|
22 |
tokenizer = AutoTokenizer.from_pretrained('sentence-transformers/msmarco-MiniLM-L-6-v3')
|
23 |
+
model_regular = ORTModelForFeatureExtraction.from_pretrained(path, from_transformers=False)
|
24 |
self.onnx_extractor = pipeline(task, model=model_regular, tokenizer=tokenizer)
|
25 |
# self.model.to(self.device)
|
26 |
# print("model will run on ", self.device)
|