An end-to-end Natural Language Processing (NLP) application that classifies customer reviews into Positive, Neutral, or Negative sentiment using TF-IDF vectorization, Logistic Regression, and an interactive Streamlit interface.
Customer feedback provides valuable insights into product quality and user satisfaction, but manually analyzing large volumes of reviews is time-consuming.
This project presents an end-to-end sentiment analysis pipeline that transforms raw customer reviews into structured sentiment predictions through text preprocessing, TF-IDF feature extraction, machine learning classification, and an interactive Streamlit application.
The application predicts customer sentiment in real time while providing prediction confidence and class probability scores for improved interpretability.
- 💬 Real-time customer review sentiment prediction
- 🤖 Logistic Regression classifier
- 📄 TF-IDF text vectorization
- 📊 Prediction confidence scores
- 📈 Class probability visualization
- 🎯 Interactive Streamlit interface
- 📝 Example reviews for quick testing
- 🔁 Reproducible machine learning pipeline
Customer Review
│
▼
Text Preprocessing
│
▼
TF-IDF Vectorization
│
▼
Logistic Regression
│
▼
Sentiment Prediction
│
▼
Confidence Score & Probability Distribution
The project follows a traditional supervised learning workflow:
- Load customer review dataset
- Split into training and testing sets
- Convert text into TF-IDF feature vectors
- Train Logistic Regression classifier
- Evaluate model performance
- Save trained model using Joblib
- Perform real-time inference through Streamlit
- Python
- Scikit-learn
- Logistic Regression
- TF-IDF Vectorizer
- Pandas
- NumPy
- Streamlit
- Joblib
customer_review_sentiment_analyzer/
├── app.py # Streamlit application
├── train.py # Model training script
├── model.pkl # Trained classifier
├── vectorizer.pkl # TF-IDF vectorizer
├── requirements.txt
├── README.md
│
├── dataset/
│ └── customer_reviews.csv
│
└── screenshots/
├── homepage.png
├── positive.png
└── negative.png
Clone the repository
git clone https://github.com/panicAtTheCompile/customer_review_sentiment_analyzer.gitInstall dependencies
pip install -r requirements.txtLaunch the application
streamlit run app.py- Transformer-based sentiment classification (BERT)
- Explainable AI using SHAP
- Cloud deployment
- Batch sentiment analysis
- REST API integration
- Aspect-based sentiment analysis
- Interactive analytics dashboard
Harshita Pulavarti
Engineering Undergraduate • IIT Kharagpur
Interested in Artificial Intelligence • Machine Learning • NLP • Data Science
This project is released under the MIT License.

