behnamsa commited on
Commit
d22d58c
·
1 Parent(s): fab0a50

Fix pipeline sample output

Browse files
Files changed (1) hide show
  1. pipeline.py +8 -6
pipeline.py CHANGED
@@ -22,12 +22,14 @@ class PreTrainedPipeline():
22
 
23
  self.model = model
24
 
25
- def __call__(self, inputs):
26
- return [ # Sample output, call the model here TODO
27
- {'label': 'POSITIVE', 'score': 0.05},
28
- {'label': 'NEGATIVE', 'score': 0.03},
29
- {'label': 'معنی', 'score': 0.92},
30
- {'label': f'{inputs}', 'score': 0},
 
 
31
  ]
32
 
33
  # def RevDict(sent,flag,model):
 
22
 
23
  self.model = model
24
 
25
+ def __call__(self, inputs: str):
26
+ return [
27
+ [ # Sample output, call the model here TODO
28
+ {'label': 'POSITIVE', 'score': 0.05},
29
+ {'label': 'NEGATIVE', 'score': 0.03},
30
+ {'label': 'معنی', 'score': 0.92},
31
+ {'label': f'{inputs}', 'score': 0},
32
+ ]
33
  ]
34
 
35
  # def RevDict(sent,flag,model):