A web application that generates inspirational quotes using an LSTM neural network trained on travel, life, and wisdom quotes.
- LSTM text generation with TensorFlow/Keras
- Web interface with Flask backend
- Customizable seed text and output length
- Trained on 200+ inspirational quotes
- Responsive design with real-time generation
- Backend: Flask, TensorFlow, NumPy
- Frontend: HTML, CSS, JavaScript
- Model: LSTM with embedding layer (64 units each)
- Clone the repository
- Install dependencies:
pip install flask tensorflow numpy
- Run the application:
python app.py
- Open http://127.0.0.1:5000
The LSTM model is trained on n-gram sequences from inspirational quotes. During generation, it predicts the next word based on the input seed text and context, iteratively building longer quotes.
Model Architecture:
- Embedding layer (64 dimensions)
- LSTM layer (64 units)
- Dense output with softmax activation
- Enter a seed word or phrase
- Set number of words to generate (1-50)
- Click "Generate Quote"
Example:
- Input: "Travel"
- Output: "Travel far enough to meet yourself and discover new adventures"
Training data includes quotes about:
- Travel & Adventure
- Life Philosophy
- Nature & Environment
- Personal Growth
- Success & Achievement
- Relationships
- Learning & Wisdom