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