asoderznik commited on
Commit
96b1d9e
1 Parent(s): 9e6a8d4

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +3 -3
handler.py CHANGED
@@ -38,11 +38,11 @@ class EndpointHandler():
38
  logger.info(f"Printing image {inputs['image']}")
39
 
40
  # decode base64 image to PIL
41
- image = Image.open(BytesIO(base64.b64decode(inputs['image'])))
42
- logger.info(f"Printing loaded image into library {image}")
43
 
44
  # run inference pipeline
45
- upscaled_image = self.pipe(prompt="", image = image).images[0]
46
 
47
  # encode image as base 64
48
  buffered = BytesIO()
 
38
  logger.info(f"Printing image {inputs['image']}")
39
 
40
  # decode base64 image to PIL
41
+ decoded_image = Image.open(BytesIO(base64.b64decode(inputs['image'])))
42
+ logger.info(f"Printing loaded image into library {decoded_image}")
43
 
44
  # run inference pipeline
45
+ upscaled_image = self.pipe(prompt="", image = decoded_image).images[0]
46
 
47
  # encode image as base 64
48
  buffered = BytesIO()