Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -28,5 +28,7 @@ def pil_to_base64_string(pil_image):
|
|
28 |
# Launch the interface
|
29 |
iface.launch()
|
30 |
|
31 |
-
|
32 |
-
|
|
|
|
|
|
28 |
# Launch the interface
|
29 |
iface.launch()
|
30 |
|
31 |
+
output_pil = iface.get_output() # get the output PIL image from the interface
|
32 |
+
output_base64_str = pil_to_base64_string(output_pil) # convert the PIL image to base64 string
|
33 |
+
with open("output_image.png", "wb") as f:
|
34 |
+
f.write(base64.b64decode(output_base64_str)) # write the decoded base64 string to a file
|