udman99 commited on
Commit
d3934ac
·
verified ·
1 Parent(s): f343524

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +1 -1
handler.py CHANGED
@@ -7,7 +7,7 @@ class EndpointHandler():
7
  self.pipe = pipeline("image-segmentation", model=path, trust_remote_code=True)
8
  def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
9
  # Extract the image path from the input data
10
- image_path = data.pop("image_path",data)
11
 
12
  # Perform image segmentation
13
  pillow_mask = self.pipe(image_path, return_mask=True) # outputs a pillow mask
 
7
  self.pipe = pipeline("image-segmentation", model=path, trust_remote_code=True)
8
  def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
9
  # Extract the image path from the input data
10
+ image_path = data.pop("inputs",data)
11
 
12
  # Perform image segmentation
13
  pillow_mask = self.pipe(image_path, return_mask=True) # outputs a pillow mask