philschmid HF staff commited on
Commit
bf24a3c
·
1 Parent(s): 3fcf89c

Update pipeline.py

Browse files
Files changed (1) hide show
  1. pipeline.py +1 -1
pipeline.py CHANGED
@@ -11,7 +11,7 @@ def mean_pooling(model_output, attention_mask):
11
  return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9)
12
 
13
 
14
- class PreTrainedPipeline():
15
  def __init__(self, path=""):
16
  # load the optimized model
17
  self.model = ORTModelForFeatureExtraction.from_pretrained(path, file_name="model-quantized.onnx")
 
11
  return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9)
12
 
13
 
14
+ class EndpointHandler():
15
  def __init__(self, path=""):
16
  # load the optimized model
17
  self.model = ORTModelForFeatureExtraction.from_pretrained(path, file_name="model-quantized.onnx")