Skip to content

A Flask-based machine learning web app that predicts furniture sales using product details, price, and shipping info with interactive visual insights.

Notifications You must be signed in to change notification settings

NeuralAditya/Furniture_Sales_Prediction_App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🪑 Furniture Sales Prediction Web App

Python Flask scikit-learn Pandas NumPy Matplotlib Seaborn ReportLab HTML CSS


🚀 Overview

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.

🖼️ UI Preview

App Screenshot

🎯 Prediction Output Screenshot

Here’s a sample output after submitting product details:

Prediction Result


🧩 Features

🔮 Prediction Engine

  • Inputs: Product Title, Price, Original Price, Shipping Tag
  • Automatically calculates discount percentage
  • Uses a TF-IDF + Random Forest model to predict sales

📊 Graphical Insights

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!

📄 PDF Report

  • Downloadable report with:
    • Prediction result
    • Embedded analysis graphs
    • Copyright

🧠 Tech Stack

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)

🗂️ Project Structure

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

🛠️ How to Run

  1. Install dependencies:

    pip install -r requirements.txt
  2. Create these folders and files:

    create model folder
    create model.pkl & tfidf.pkl
    keep both files empty
    (req to save trained models)
  3. Train the model:

    python train_model.py
  4. Run the Flask app:

    python app.py
  5. Open browser at:

    http://localhost:5000
    

🧪 Example Prediction Flow

  1. Fill the form on homepage
  2. Click Predict
  3. View result and insights
  4. Click Download as PDF to save the report

👤 Developer

Made with ❤️ by Aditya Arora
© 2025 Aditya Arora. All rights reserved.


About

A Flask-based machine learning web app that predicts furniture sales using product details, price, and shipping info with interactive visual insights.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published