Predict star ratings from product reviews using a TF-IDF + Linear Regression pipeline trained on 190,000+ real Flipkart reviews.
- Real-time Text Analysis — Paste any product review and instantly get a predicted star rating (1–5) with confidence score and animated visual feedback
- CSV Batch Processing — Upload any CSV file with review data and get a full sentiment distribution, star breakdown, and row-by-row preview
- Flexible Column Detection — Works with standard columns (
ProductName,Review,Summary) or any custom column names automatically - Production Ready — Deployed on Render with Gunicorn, CORS-enabled REST API, and a fully responsive frontend
https://sentiscan-product-review-intelligence.onrender.com
⚠️ Hosted on Render's free tier — first load may take 30–60 seconds to wake up from idle.
| Text Analysis | CSV Batch Results |
|---|---|
| Paste a review → get star rating + confidence | Upload CSV → full distribution + preview table |
Raw Review Text
│
▼
Text Cleaning (lowercase, remove special chars)
│
▼
TF-IDF Vectorization (5,000 features)
│
▼
Linear Regression Model
│
▼
Predicted Star Rating (1–5) + Confidence Score
The model was trained on 189,874 Flipkart product reviews combining ProductName, Review, and Summary columns into a single text feature. The predicted float is clipped and rounded to the nearest integer in the 1–5 range.
SentiScan/
├── app.py # Flask backend — REST API
├── requirements.txt # Python dependencies
├── sentiment_model.pkl # Trained model + TF-IDF vectorizer
└── static/
└── index.html # Frontend — HTML, CSS, Vanilla JS
Check if the server and model are running.
Response:
{
"status": "ok",
"model_loaded": true
}Predict sentiment for a single text input.
Request:
{
"text": "Amazing product! Totally worth the price."
}Response:
{
"score": 5,
"raw": 4.823,
"label": "Very Positive",
"color": "#10b981",
"confidence": 82.3
}Batch analyze an entire CSV file.
Request: multipart/form-data with a file field containing a .csv file
Response:
{
"total": 200,
"distribution": {
"1": { "count": 20, "pct": 10.0 },
"5": { "count": 95, "pct": 47.5 }
},
"summary": {
"good": { "count": 130, "pct": 65.0 },
"neutral": { "count": 30, "pct": 15.0 },
"bad": { "count": 40, "pct": 20.0 }
},
"preview": [...]
}1. Clone the repo
git clone https://github.com/Samin-Saikia/SentiScan-Product-Review-Intelligence.git
cd SentiScan-Product-Review-Intelligence2. Install dependencies
pip install -r requirements.txt3. Run the server
python app.py4. Open in browser
http://localhost:5000
Trained on the Flipkart Product Reviews dataset containing 189,874 entries across 812 unique products.
| Column | Description |
|---|---|
ProductName |
Name of the product |
Price |
Listed price |
Rate |
Star rating (1–5) — target variable |
Review |
Short review title |
Summary |
Full review text |
| Layer | Technology |
|---|---|
| ML Model | scikit-learn — TF-IDF + Linear Regression |
| Backend | Python, Flask, Gunicorn |
| Frontend | HTML5, CSS3, Vanilla JavaScript |
| Deployment | Render |
| Metric | Value |
|---|---|
| Algorithm | Linear Regression |
| Vectorizer | TF-IDF (5,000 features) |
| Train/Test Split | 80% / 20% |
| Target | Star Rating (1–5) |
Samin Saikia
- GitHub: @Samin-Saikia
This project is open source and available under the MIT License.