Skip to content

mythrhyth/story_generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“– AI Story Generator

Welcome to the AI Story Generator App! This web application uses a trained LSTM model to generate creative story continuations based on a user-provided starting sentence.

streamlit-logo


πŸš€ Demo

Start the app locally:

streamlit run app.py

🧠 About the Project

This project uses deep learning with LSTM (Long Short-Term Memory) to build a text generation model trained on story-like text. The trained model continues a sentence by predicting and generating the next words, one at a time.


πŸ—‚ Project Structure

.
β”œβ”€β”€ app.py                # Streamlit application code
β”œβ”€β”€ story_generator.h5    # Trained LSTM model (Keras)
β”œβ”€β”€ tokenizer.pkl         # Tokenizer used during training
β”œβ”€β”€ requirements.txt      # Python dependencies
└── README.md             # You're reading this!

πŸ§ͺ Features

  • Generate stories word-by-word from a custom seed sentence
  • Adjustable output length (10–100 words)
  • Fast and simple web interface via Streamlit

βš™οΈ Setup Instructions

  1. βœ… Clone the repository or download the files
  2. βœ… Install dependencies:
pip install -r requirements.txt
  1. βœ… Run the app:
streamlit run app.py

πŸ“† Requirements

  • Python 3.7+
  • TensorFlow
  • Numpy
  • Streamlit

(See requirements.txt for full list.)


✨ Example Output

Input: The prince entered the forest Generated: The prince entered the forest and saw a strange creature standing in the mist. It looked at him with glowing eyes and then...


πŸ™Œ Acknowledgements

  • Built with ❀️ using Keras and Streamlit
  • Inspired by creative text generation projects and LSTM-based language models

πŸ“¬ Contact

If you’d like to collaborate or give feedback, feel free to reach out!

About

Automatic fairy tale generator using LSTM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages