philipp-zettl commited on
Commit
fe54d1e
1 Parent(s): ff057e8

Update handler.py

Browse files
Files changed (1) hide show
  1. 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
- inputs = data.pop("inputs",data)
22
 
23
- # run normal prediction
24
- return self.pipeline(inputs)
 
 
 
 
 
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