wealthcoders commited on
Commit
ba690ad
·
verified ·
1 Parent(s): 147fcdd

Update handler.py

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