philschmid HF staff commited on
Commit
6f78dbc
1 Parent(s): a11291c

Update pipeline.py

Browse files
Files changed (1) hide show
  1. pipeline.py +2 -6
pipeline.py CHANGED
@@ -7,9 +7,7 @@ class PreTrainedPipeline():
7
  # Preload all the elements you are going to need at inference.
8
  # For instance your model, processors, tokenizer that might be needed.
9
  # This function is only called once, so do all the heavy processing I/O here"""
10
- raise NotImplementedError(
11
- "Please implement PreTrainedPipeline __init__ function"
12
- )
13
 
14
  def __call__(self, inputs: str) -> List[List[Dict[str, float]]]:
15
  """
@@ -22,6 +20,4 @@ class PreTrainedPipeline():
22
  - "score": A score between 0 and 1 describing how confident the model is for this label/class.
23
  """
24
  # IMPLEMENT_THIS
25
- raise NotImplementedError(
26
- "Please implement PreTrainedPipeline __call__ function"
27
- )
 
7
  # Preload all the elements you are going to need at inference.
8
  # For instance your model, processors, tokenizer that might be needed.
9
  # This function is only called once, so do all the heavy processing I/O here"""
10
+ self.path = path
 
 
11
 
12
  def __call__(self, inputs: str) -> List[List[Dict[str, float]]]:
13
  """
 
20
  - "score": A score between 0 and 1 describing how confident the model is for this label/class.
21
  """
22
  # IMPLEMENT_THIS
23
+ return inputs.upper()