wealthcoders commited on
Commit
5bdd01a
·
verified ·
1 Parent(s): 0ba1f5a

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +2 -1
handler.py CHANGED
@@ -25,7 +25,8 @@ class EndpointHandler:
25
 
26
  def __call__(self, data: Dict[str, Any]) -> str:
27
  # Prepare your messages with image and text
28
- base64image = data.get("base64")
 
29
 
30
  img_bytes = base64.b64decode(base64image)
31
  pil_img = Image.open(io.BytesIO(img_bytes)).convert("RGB")
 
25
 
26
  def __call__(self, data: Dict[str, Any]) -> str:
27
  # Prepare your messages with image and text
28
+ inputs = data.get("inputs")
29
+ base64image = inputs["base64"]
30
 
31
  img_bytes = base64.b64decode(base64image)
32
  pil_img = Image.open(io.BytesIO(img_bytes)).convert("RGB")