Updated handler.py
Browse files- handler.py +1 -1
handler.py
CHANGED
@@ -31,7 +31,7 @@ class EndpointHandler:
|
|
31 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
32 |
|
33 |
if type(inputs) is str:
|
34 |
-
inputs =
|
35 |
|
36 |
raw_images = Image.open(BytesIO(inputs))
|
37 |
|
|
|
31 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
32 |
|
33 |
if type(inputs) is str:
|
34 |
+
inputs = base64.b64encode(bytes(inputs, 'utf-8'))
|
35 |
|
36 |
raw_images = Image.open(BytesIO(inputs))
|
37 |
|