thoth-AI commited on
Commit
5edf3dc
1 Parent(s): d576d35

Updated handler.py

Browse files
Files changed (1) hide show
  1. 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 = inputs.encode('utf-8')
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