Update handler.py
Browse files- handler.py +2 -1
handler.py
CHANGED
@@ -18,7 +18,8 @@ class EndpointHandler:
|
|
18 |
A list of one list, e.g., [[{"label": "LABEL", "score": 0.99}]]
|
19 |
"""
|
20 |
# Pass the data as `text` directly
|
21 |
-
|
|
|
22 |
|
23 |
# Return the prediction result
|
24 |
return prediction
|
|
|
18 |
A list of one list, e.g., [[{"label": "LABEL", "score": 0.99}]]
|
19 |
"""
|
20 |
# Pass the data as `text` directly
|
21 |
+
inputs = data.pop("inputs", data)
|
22 |
+
prediction = self.pipeline(inputs)
|
23 |
|
24 |
# Return the prediction result
|
25 |
return prediction
|