Skip to content

A webapp that uses ChatGPT and diffusion generative models for images to create short children's picture books based on the user's input.

License

Notifications You must be signed in to change notification settings

mbloom23/mbel-gpt-flask

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MBEL - Mini-Books for Entertainment and Learning

MBEL ("Mabel") is a picture book generator app based on the OpenAI API quickstart tutorial. It uses the Flask web framework. Follow the instructions below to setup the app.

Setup

  1. If you don’t have Python installed, install it from here.

  2. Clone this repository.

    git clone https://github.com/mbloom23/mbel-gpt-flask.git
  3. Navigate into the project directory:

    cd mbel-gpt-flask
  4. Create and activate a new virtual environment:

    python -m venv venv
    . venv/bin/activate # Mac
    # for Windows
    venv\Scripts\activate
  5. Install the requirements:

    pip install -r requirements.txt
  6. Make a copy of the example environment variables file:

    cp .env.example .env
    # for Windows
    copy .env.example .env
  7. Add your API key to the newly created .env file.

    export OPENAI_API_KEY='YOUR_API_KEY_HERE'

    Note: you may need to deactivate and reactivate your virtual environment here before running the app.

  8. Run the app:

    flask run

You should now be able to access the app at the URL displayed in your terminal! Enter a topic or premise for your story in the box, press enter, and wait for the generation to load. Try describing different plot points, characters, or morals for your story.

Screen Shot 2023-03-18 at 6 21 27 PM

About

A webapp that uses ChatGPT and diffusion generative models for images to create short children's picture books based on the user's input.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Python 42.8%
  • CSS 35.9%
  • HTML 21.3%