This project implements a Next-Word Generator using both MLP and LSTM neural network architectures. All models are trained on the Cleaned Indian Recipes Dataset from Kaggle.
It also features an interactive Streamlit web app for text generation, which is also deployed at Recipe Next Word Generator.
- MLP and LSTM Models: Choose between Multi-Layer Perceptron and LSTM for next-word generation.
- Interactive Streamlit App: User-friendly interface for generating text based on a seed prompt with customizable parameters like context size, embedding dimension, activation function, random seed and temperature.
- Pre-trained Models: No need to retrain; select from pre-trained variants.
- Word Embedding Visualization: Notebooks for t-SNE and other embedding visualizations.
├── assets/
├── models/
│ ├── mlp/
│ └── lstm/
├── streamlit_app.py
├── MLP.ipynb
├── LSTM.ipynb
├── embeddings.ipynb
├── README.md
└── requirements.txt
- Clone the repository:
git clone https://github.com/ShardulJunagade/Next-Word-Generator.git cd Next-Word-Prediction - Install dependencies:
pip install uv uv pip install -r requirements.txt
streamlit run streamlit_app.pyThe app will open in your browser. Enter a seed text or use the default, select model and parameters, and generate text.
MLP.ipynb: Data processing, training, and evaluation for the MLP model.LSTM.ipynb: Data processing, training, and evaluation for the LSTM model.embeddings.ipynb: Visualization of learned word embeddings.
This project is licensed under the MIT License. See the LICENSE file for details.