jbilcke-hf HF staff commited on
Commit
3841f91
1 Parent(s): 201ac66

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +1 -1
handler.py CHANGED
@@ -339,7 +339,7 @@ class EndpointHandler:
339
  if input_image:
340
  # Process base64 image
341
  if input_image.startswith('data:'):
342
- input_image = image_data.split(',', 1)[1]
343
  image_bytes = base64.b64decode(input_image)
344
  image = Image.open(io.BytesIO(image_bytes)).convert("RGB")
345
  generation_kwargs["image"] = image
 
339
  if input_image:
340
  # Process base64 image
341
  if input_image.startswith('data:'):
342
+ input_image = input_image.split(',', 1)[1]
343
  image_bytes = base64.b64decode(input_image)
344
  image = Image.open(io.BytesIO(image_bytes)).convert("RGB")
345
  generation_kwargs["image"] = image