update
Browse files- pipeline.py +2 -2
pipeline.py
CHANGED
@@ -12,7 +12,7 @@ class PreTrainedPipeline():
|
|
12 |
# )
|
13 |
pass
|
14 |
|
15 |
-
def __call__(self, inputs: str) -> List[List[Dict[str, float]]]:
|
16 |
"""
|
17 |
Args:
|
18 |
inputs (:obj:`str`):
|
@@ -26,4 +26,4 @@ class PreTrainedPipeline():
|
|
26 |
# raise NotImplementedError(
|
27 |
# "Please implement PreTrainedPipeline __call__ function"
|
28 |
# )
|
29 |
-
return [[{"label": inputs, "score":0.2}]]
|
|
|
12 |
# )
|
13 |
pass
|
14 |
|
15 |
+
def __call__(self, inputs: str, *args, **kargs) -> List[List[Dict[str, float]]]:
|
16 |
"""
|
17 |
Args:
|
18 |
inputs (:obj:`str`):
|
|
|
26 |
# raise NotImplementedError(
|
27 |
# "Please implement PreTrainedPipeline __call__ function"
|
28 |
# )
|
29 |
+
return [[{"label": inputs, "score":0.2}, {"args": args}, kargs]]
|