justin-shopcapsule commited on
Commit
07a9231
1 Parent(s): 33324d6

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +3 -0
handler.py CHANGED
@@ -685,6 +685,9 @@ class EndpointHandler():
685
  # forward pass
686
  output_image = self.model.predict([image])
687
 
 
 
 
688
  # base64 encode output
689
  buffered = BytesIO()
690
  output_image = output_image.convert('RGB')
 
685
  # forward pass
686
  output_image = self.model.predict([image])
687
 
688
+ if isinstance(output_image, list):
689
+ output_image = output_image[0]
690
+
691
  # base64 encode output
692
  buffered = BytesIO()
693
  output_image = output_image.convert('RGB')