Inquira is an AI-powered product sales predictor built with Flask. It analyzes product pricing, discount metrics, review sentiment, and product descriptions to predict whether a product will have Good Sales or Low Selling performance — and if underperforming, explains why using SHAP and gives actionable suggestions to improve.
- Sales Prediction — Classifies a product as "Good Sales" or "Low Selling" using a trained ML pipeline.
- SHAP Explainability — For low-selling predictions, surfaces the top contributing factors driving the result.
- Actionable Suggestions — Provides concrete recommendations to improve product performance.
- NLP Description Analysis — Analyzes product descriptions using TextBlob and Gensim to identify language quality issues.
- Flask Web Interface — Simple, clean web UI for entering product details and viewing results.
Inquira/
├── app.py # Flask app — routes and request handling
├── predictor.py # Loads pipeline.pkl and runs predictions
├── explain.py # SHAP-based explanation and suggestions
├── description_analyzer.py # NLP analysis of product descriptions
├── train_pipeline.py # Script to train and save the ML pipeline
├── pipeline.pkl # Trained scikit-learn pipeline (serialized)
├── amazon_clean_data.csv # Cleaned Amazon product dataset
├── sales.ipynb # Exploratory data analysis notebook
├── style.css # Stylesheet
├── templates/ # Jinja2 HTML templates
└── requirements.txt # Python dependencies
| Feature | Description |
|---|---|
discounted_price |
Current selling price after discount |
actual_price |
Original MRP of the product |
discount_percentage |
Percentage discount applied |
rating |
Average customer rating |
discount |
Absolute discount amount |
price_diff |
Difference between actual and discounted price |
description |
Product description text (auto-computes length) |
review_sentiment |
Sentiment score derived from customer reviews |
git clone https://github.com/Prriiiyankaaa/Inquira.git
cd Inquirapip install -r requirements.txtpython train_pipeline.pySkip this step if you want to use the pre-trained
pipeline.pklincluded in the repo.
python app.pyThen open your browser and navigate to http://127.0.0.1:5000.
| Layer | Tools |
|---|---|
| Web Framework | Flask |
| ML | scikit-learn, SHAP, joblib |
| NLP | TextBlob, Gensim |
| Data | pandas, numpy |
| Visualization | matplotlib, seaborn |
| Dataset | Amazon product data (amazon_clean_data.csv) |
- The user submits product details via the web form.
predictor.pyloads the serializedpipeline.pkland returns a prediction.- If the product is predicted as Low Selling:
explain.pyuses SHAP to identify which features are hurting performance and generates suggestions.description_analyzer.pyruns NLP analysis on the product description to flag quality issues.
- Results — prediction, SHAP reasons, suggestions, and description analysis — are rendered in the UI.
The project uses amazon_clean_data.csv, a cleaned dataset of Amazon product listings with fields including pricing, ratings, discounts, and review data. The notebook sales.ipynb contains the full EDA and feature engineering process.
Pull requests are welcome! For major changes, please open an issue first to discuss what you'd like to change.
Prriiiyankaaa — GitHub