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

 
 
 

Contributors

Languages