Skip to main content

A AI-based story writer Python library which uses OpenAI's chatGPT and Dall-E to generate PDFs with a story and a picture from a prompt and writes them into a PDF.

Project description

Story writer

A AI-based story writer and Python library which uses OpenAI's chatGPT and Dall-E to generate PDFs with a story and a picture from a prompt and writes them into a PDF.

Usage: Streamlit app

You can try the streamlit app by installing streamlit and running this terminal command:

story-writer

img.png

Usage: Python

There is a high-level API available, which generates PDFs from prompts (e.g. the stories presented in the teaser above were produced using this notebook):

from story_writer import generate_story
generate_story("cat_story.pdf", "a story about a cat that is walking on a street")

And there is a low-level API available, which generates a story and an image separately. You can learn more about the low-level API in this notebook.

Installation

You can install story-writer using pip:

pip install story-writer

You also need to create an OpenAI API Key and add it to your environment variables as explained on this page.

Development

If you want to contribute to bia-bob, you can install it in development mode like this:

git clone https://github.com/haesleinhuepf/story-writer.git
cd story-writer
pip install -e .

Similar projects

Feedback welcome!

The story-writer is developed in the open because we believe in the open source community. Feel free to drop feedback as github issue. Contributions are very welcome.

License

Distributed under the terms of the BSD-3 license, "story-writer" is free and open source software

Acknowledgements

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

story-writer-0.1.1.tar.gz (9.0 kB view hashes)

Uploaded Source

Built Distribution

story_writer-0.1.1-py3-none-any.whl (9.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page