Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ def decode(image_str):
|
|
19 |
if image_str is None:
|
20 |
raise gr.Error('No input image string')
|
21 |
|
22 |
-
image_byte = base64.
|
23 |
image = cv2.imdecode(np.frombuffer(image_byte, np.uint8), cv2.IMREAD_UNCHANGED)
|
24 |
image = Image.fromarray(image[:,:,::-1])
|
25 |
return image
|
|
|
19 |
if image_str is None:
|
20 |
raise gr.Error('No input image string')
|
21 |
|
22 |
+
image_byte = base64.b64decode(image_str)
|
23 |
image = cv2.imdecode(np.frombuffer(image_byte, np.uint8), cv2.IMREAD_UNCHANGED)
|
24 |
image = Image.fromarray(image[:,:,::-1])
|
25 |
return image
|