philipp-zettl
commited on
Commit
•
fe54d1e
1
Parent(s):
ff057e8
Update handler.py
Browse files- handler.py +7 -3
handler.py
CHANGED
@@ -18,7 +18,11 @@ class EndpointHandler():
|
|
18 |
A :obj:`list` | `dict`: will be serialized and returned
|
19 |
"""
|
20 |
# get inputs
|
21 |
-
|
22 |
|
23 |
-
#
|
24 |
-
|
|
|
|
|
|
|
|
|
|
18 |
A :obj:`list` | `dict`: will be serialized and returned
|
19 |
"""
|
20 |
# get inputs
|
21 |
+
parameters = data.pop("parameters", None)
|
22 |
|
23 |
+
# pass inputs with all kwargs in data
|
24 |
+
if parameters is not None:
|
25 |
+
prediction = self.pipeline(inputs, **parameters)
|
26 |
+
else:
|
27 |
+
prediction = self.pipeline(inputs)
|
28 |
+
return prediction
|