-
-
Save metacritical/c47f0bb0f385e68da62d2d520b1643bb to your computer and use it in GitHub Desktop.
Save kandinsky generated images
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| display(images[0]) | |
| import os | |
| import uuid | |
| from PIL import Image | |
| # path to the folder where the image will be saved | |
| folder_path = 'C:/Kandinsky-2/imgs' | |
| # generate a unique identifier | |
| guid = uuid.uuid4() | |
| # create the file name using the GUID and the image file extension | |
| file_name = str(guid) + '.png' | |
| # save the image to the folder with the GUID name | |
| images[0].save(os.path.join(folder_path, file_name)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment