Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Story Illustrator Web App

A web application built with Flask and JavaScript that allows users to illustrate their stories using the Stable Diffusion API. This project processes user-submitted stories to generate creative prompts through a keyword selection model and sends them to the Stable Diffusion model for illustration.

Live Demo

You can access the live version of the application hosted on PythonAnywhere at https://teresaacsf.pythonanywhere.com/.

Table of Contents

Features

Story Creation: Users can input and edit their stories using a text area.

Automatic Keyword Generation: Generate keywords for images related to the story content with a single click.

Image Generation: Users can input keywords to generate images based on their stories.

Style Selection: Choose from a variety of artistic styles (e.g., Watercolor, Cartoon, Ukiyo-e, Impressionism) to customize illustrations.

Image Viewing: Click on generated images to view them in a modal.

Save Functionality: Users can save their stories for future reference.

Dynamic UI: Add new story parts dynamically with an "Add New Story Part" button.

Suggestions Modal: Offers predefined style suggestions to enhance the story's atmosphere.

Technologies Used

  • Flask (Python)
  • JavaScript
  • HTML/CSS
  • YAKE (Keyword extraction)
  • Stable Diffusion API

Installation

To set up the project locally, follow these steps:

  1. Clone the repository:
    git clone https://github.com/teresaacsf/ai-illustrator.git
    cd ai-illustrator
    
  2. Create a virtual environment (optional but recommended):
    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
    
  3. Install dependencies
     pip install -r requirements.txt
    
  4. Run the application
    python app.py
    

Usage

Follow these steps to illustrate your stories using the web app:

  1. Open the Web Application:

    • Navigate to http://127.0.0.1:5000 in your web browser.
  2. Input Your Story:

    • In the provided text areas, enter your story. You can fill out multiple text areas to illustrate different parts of your story.
  3. Select Keywords (Optional):

    • If you wish to generate a prompt automatically, you can use the "Automatic Generation" button. This will extract keywords from your story using the YAKE algorithm.
    • Alternatively, you can manually enter a prompt in the corresponding text box below each story input area.
  4. Generate the Image:

    • Click the "Generate Image" button next to the prompt text area to send your prompt to the Stable Diffusion API. The generated image will be displayed in the image container below each respective text area.
  5. View the Generated Images:

    • After the processing is complete, the illustrations generated by Stable Diffusion will appear in the designated image containers.

Contributing

Contributions are welcome! Please fork the repository and submit a pull request for any enhancements or bug fixes.

Acknowledgements

Flask for the web framework Stable Diffusion for image generation YAKE for keyword extraction

About

A web application built with Flask and JavaScript that allows users to illustrate their stories using the Stable Diffusion API. This project processes user-submitted stories to generate creative prompts through a keyword selection model and sends them to the Stable Diffusion model for illustration.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages