syarulzaffi commited on
Commit
2697a09
·
verified ·
1 Parent(s): 0a71e77

Update handler.py

Browse files
Files changed (1) hide show
  1. 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
- prediction = self.pipeline(text=data)
 
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