This project is a deep learning-based web application that predicts the next word in a sequence of text. The model is a Long Short-Term Memory (LSTM) neural network trained on the text of William Shakespeare's Hamlet.
- Deep Learning Model: Utilizes an LSTM-RNN architecture for sequence prediction.
- Natural Language Processing: Employs word tokenization and padding to process input text.
- Interactive Interface: A user-friendly UI built with Streamlit for real-time word generation.
- Early Stopping: The model was trained with early stopping to prevent overfitting and ensure better generalization.
- Frontend: Streamlit
- Machine Learning Framework: TensorFlow / Keras
- Data Manipulation: Pandas, NumPy
- Preprocessing: Scikit-Learn
To run this project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/SidoJain/Next-Word-Prediction-LSTM-RNN.git
-
Create a virtual environment:
python -m venv .venv source .venv/Script/activate -
Install dependencies:
pip install -r requirements.txt
-
Launch the app:
streamlit run app.py