Kaixuanliu commited on
Commit
43408ea
1 Parent(s): a232e0c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -31,6 +31,9 @@ from about import (
31
 
32
 
33
  def process_image_from_binary(img_stream):
 
 
 
34
  image_data = base64.b64decode(img_stream)
35
  image_bytes = BytesIO(image_data)
36
  img = Image.open(image_bytes)
 
31
 
32
 
33
  def process_image_from_binary(img_stream):
34
+ if img_stream is None:
35
+ print("no image binary")
36
+ return
37
  image_data = base64.b64decode(img_stream)
38
  image_bytes = BytesIO(image_data)
39
  img = Image.open(image_bytes)