Closed MartinAbilev closed 1 year ago
Are you using Colab? If so, open the filesystem in the sidebar and it should be there!
I'm running in vs code Jupyter locally
Ah, this might be the problem... so on Colab, typically, new files are stored in the content
folder.
So adjust this part of the code:
for i, image in enumerate(data["artifacts"]):
with open(f"/content/cover.png", "wb") as f: # replace this if running locally, to where you store the cover file
f.write(base64.b64decode(image["base64"]))
and this part of the code:
create_epub(title, 'AI', chapter_titles, '/content/cover.png')
Change /content/cover.png
to whatever makes sense for your filesystem.
I already disabled cover generation because it got already cover I want to put on.
hmm, the next thing you can try is modifying epub.write_epub(f'{title}.epub', book)
to specify the directory.
ou yeah now it saves as needed thanks :)
@MartinAbilev If your problem is solved, don't forget to close the issue.
after generation i can`t find where epub is saved or saved at all :D waste of my tokens damn :D