The IMDB Sentiment Analyzer is an End-to-End Deep Learning Pipeline that classifies IMDB movie reviews into Positive or Negative sentiments.
It uses an LSTM neural network built in PyTorch and is deployed with an interactive Streamlit web app.
💡 Just enter any movie review, and the app will display:
- Sentiment result (Positive/Negative)
- Confidence score visualized as ⭐ star ratings
![]() |
![]() |
|---|
- 🧠 Deep Learning Model – LSTM trained from scratch
- 🗃 IMDB Dataset (50K reviews)
- 🎨 Streamlit UI with custom background & styled theme
- ⭐ Confidence visualization with star ratings
- 📊 ~87% Accuracy on test dataset
- Data Preprocessing (cleaning, tokenization, encoding)
- Vocabulary Encoding
- Train/Test Split
- Model Training (LSTM)
- Save Trained Model (
imdb_lstm_model.pth) - Deploy using Streamlit
Model Summary:
- Embedding Layer
- LSTM Layer
- Dropout (0.5)
- Fully Connected Layer
- Sigmoid Output
Dataset: IMDB 50K Movie Reviews
- 25,000 labeled reviews for training
- 25,000 labeled reviews for testing
- Balanced Positive & Negative classes
- Python 3.9+
- PyTorch (Deep Learning)
- Streamlit (Web UI)
- Pandas, NumPy, Scikit-learn (Data Processing)
git clone https://github.com/your-username/IMDB-Sentiment-Analyzer.git
cd IMDB-Sentiment-Analyzerpython -m venv venv
source venv/bin/activate # On Mac/Linux
venv\Scripts\activate # On Windows
pip install -r requirements.txtstreamlit run app.py- Accuracy: ~87%
- Confidence score visualization helps interpret predictions easily.
- ✅ Add Transformer/BERT-based model for better accuracy
- ✅ Deploy with Docker for scalability
- ✅ Multi-language support
This project is licensed under the MIT License – see the LICENSE file for details.

