This web application predicts how many units of a furniture product will be sold based on features like product title, price, original price, and shipping tag. It uses a trained machine learning model and also provides visual insights and a downloadable PDF report.
Here’s a sample output after submitting product details:
- Inputs: Product Title, Price, Original Price, Shipping Tag
- Automatically calculates discount percentage
- Uses a TF-IDF + Random Forest model to predict sales
Interactive graphs shown:
- Predicted vs Actual Sales
- Price vs Predicted Sales
- Feature Importance
- Distribution of Sold Items
- Sales by Shipping Tag
- Sales by Discount Percentage
- Price Distribution
- Tag Breakdown, and more!
- Downloadable report with:
- Prediction result
- Embedded analysis graphs
- Copyright
Layer | Tech |
---|---|
Backend | Python, Flask |
ML/Processing | scikit-learn, pandas, NumPy |
Text Features | TF-IDF Vectorization |
Visualization | matplotlib, seaborn |
PDF Reports | ReportLab |
Frontend | HTML, CSS (custom styles) |
ECOM_FURNITURE/
│
├── app.py
├── train_model.py
├── requirements.txt
├── README.md
│
├── data/
│ └── ecommerce_furniture_dataset_2024.csv
│
├── model/
│ ├── model.pkl
│ └── tfidf.pkl
│
├── static/
│ ├── styles.css
│ └── graphs/
│ └── *.png
│
├── templates/
│ ├── index.html
│ └── result.html
-
Install dependencies:
pip install -r requirements.txt
-
Create these folders and files:
create model folder create model.pkl & tfidf.pkl keep both files empty (req to save trained models)
-
Train the model:
python train_model.py
-
Run the Flask app:
python app.py
-
Open browser at:
http://localhost:5000
- Fill the form on homepage
- Click Predict
- View result and insights
- Click Download as PDF to save the report
Made with ❤️ by Aditya Arora
© 2025 Aditya Arora. All rights reserved.