asoderznik commited on
Commit
ba24c0a
1 Parent(s): b4614a6

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +5 -5
handler.py CHANGED
@@ -49,10 +49,10 @@ class EndpointHandler():
49
  with autocast(device.type):
50
  upscaled_image = self.pipe(prompt, image).images[0]
51
 
52
- #buffered = BytesIO()
53
- #upscaled_image.save(buffered, format="JPEG")
54
- #img_str = base64.b64encode(buffered.getvalue())
55
 
56
  # postprocess the prediction
57
- #return {"image": img_str}
58
- return {"image": "test"}
 
49
  with autocast(device.type):
50
  upscaled_image = self.pipe(prompt, image).images[0]
51
 
52
+ buffered = BytesIO()
53
+ upscaled_image.save(buffered, format="JPEG")
54
+ img_str = base64.b64encode(buffered.getvalue())
55
 
56
  # postprocess the prediction
57
+ return {"image": img_str}
58
+ #return {"image": "test"}