sguna commited on
Commit
f83f8ef
1 Parent(s): 138ad6d

Upload handler.py

Browse files
Files changed (1) hide show
  1. handler.py +1 -1
handler.py CHANGED
@@ -30,7 +30,7 @@ class EndpointHandler():
30
  text = data.get("text", "")
31
  parameters = data.pop("parameters", {})
32
 
33
- raw_images = Image.open(BytesIO(base64.b64decode(inputs))).convert("RGB")
34
 
35
  processed_image = self.processor(images=raw_images, text=text, return_tensors="pt")
36
  processed_image["pixel_values"] = processed_image["pixel_values"].to(device)
 
30
  text = data.get("text", "")
31
  parameters = data.pop("parameters", {})
32
 
33
+ raw_images = Image.open(inputs).convert("RGB")
34
 
35
  processed_image = self.processor(images=raw_images, text=text, return_tensors="pt")
36
  processed_image["pixel_values"] = processed_image["pixel_values"].to(device)