Updated handler.py
Browse files- handler.py +1 -1
handler.py
CHANGED
@@ -32,7 +32,7 @@ class EndpointHandler:
|
|
32 |
# parameters = data.pop("parameters", {})
|
33 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
34 |
|
35 |
-
raw_images = Image.open(BytesIO(inputs))
|
36 |
|
37 |
processed_image = self.processor(images=raw_images, return_tensors="pt").to(device)
|
38 |
|
|
|
32 |
# parameters = data.pop("parameters", {})
|
33 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
34 |
|
35 |
+
raw_images = Image.open(BytesIO(inputs.encode('utf-8')))
|
36 |
|
37 |
processed_image = self.processor(images=raw_images, return_tensors="pt").to(device)
|
38 |
|