Upload handler.py
Browse files- 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(
|
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)
|