Mirza Učanbarlić commited on
Commit
b074d05
·
1 Parent(s): c058aa4

fix img_str

Browse files
Files changed (1) hide show
  1. handler.py +1 -1
handler.py CHANGED
@@ -37,7 +37,7 @@ class EndpointHandler():
37
  # encode image as base 64
38
  buffered = BytesIO()
39
  image.save(buffered, format="JPEG")
40
- img_str = base64.b64encode(buffered.getvalue())
41
 
42
  # postprocess the prediction
43
  return {"image": img_str}
 
37
  # encode image as base 64
38
  buffered = BytesIO()
39
  image.save(buffered, format="JPEG")
40
+ img_str = base64.b64encode(buffered.getvalue()).decode('utf-8')
41
 
42
  # postprocess the prediction
43
  return {"image": img_str}