Jeney commited on
Commit
781701c
1 Parent(s): 402c710

Fix inputs

Browse files
Files changed (1) hide show
  1. handler.py +3 -2
handler.py CHANGED
@@ -13,8 +13,9 @@ class EndpointHandler:
13
 
14
  def __call__(self, data: Dict[str, Any]) -> Dict[str, str]:
15
  # process input
16
- image = data.pop("image", data)
17
- text = data.pop("text", data)
 
18
 
19
  # preprocess
20
  encoding = self.processor(image, text, return_tensors="pt")
 
13
 
14
  def __call__(self, data: Dict[str, Any]) -> Dict[str, str]:
15
  # process input
16
+ inputs = data.pop("inputs", data)
17
+ image = inputs["image"]
18
+ text = inputs["text"]
19
 
20
  # preprocess
21
  encoding = self.processor(image, text, return_tensors="pt")