Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -79,8 +79,8 @@ def generate_image(
|
|
79 |
apply_refiner=apply_refiner,
|
80 |
api_name="/run",
|
81 |
)
|
82 |
-
|
83 |
-
image_bytes = base64.b64decode(
|
84 |
image = Image.open(BytesIO(image_bytes)) # Ensure the result is converted to a PIL Image
|
85 |
normal_map = generate_normal_map(image)
|
86 |
return image, normal_map
|
|
|
79 |
apply_refiner=apply_refiner,
|
80 |
api_name="/run",
|
81 |
)
|
82 |
+
result = fix_base64_padding(result) # Fix the padding of the base64 string
|
83 |
+
image_bytes = base64.b64decode(result)
|
84 |
image = Image.open(BytesIO(image_bytes)) # Ensure the result is converted to a PIL Image
|
85 |
normal_map = generate_normal_map(image)
|
86 |
return image, normal_map
|