thoth-AI commited on
Commit
70c6e5e
1 Parent(s): d6460d1

Updated handler.py

Browse files
Files changed (1) hide show
  1. 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