Spaces:
Sleeping
Sleeping
Kaixuanliu
commited on
Update app.py
Browse files
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)
|