update
Browse files- pipeline.py +8 -6
pipeline.py
CHANGED
@@ -7,9 +7,10 @@ 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 |
-
|
12 |
-
)
|
|
|
13 |
|
14 |
def __call__(self, inputs: str) -> List[List[Dict[str, float]]]:
|
15 |
"""
|
@@ -22,6 +23,7 @@ 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 |
-
|
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 |
+
# raise NotImplementedError(
|
11 |
+
# "Please implement PreTrainedPipeline __init__ function"
|
12 |
+
# )
|
13 |
+
pass
|
14 |
|
15 |
def __call__(self, inputs: str) -> List[List[Dict[str, float]]]:
|
16 |
"""
|
|
|
23 |
- "score": A score between 0 and 1 describing how confident the model is for this label/class.
|
24 |
"""
|
25 |
# IMPLEMENT_THIS
|
26 |
+
# raise NotImplementedError(
|
27 |
+
# "Please implement PreTrainedPipeline __call__ function"
|
28 |
+
# )
|
29 |
+
return [[{"label": inputs, "score":0.2}]]
|