Skip to content

Repository files navigation

🚗 Car Price Prediction System

A modern Machine Learning-powered Car Price Prediction Web Application built with Python, Flask, Scikit-learn, HTML, CSS, and JavaScript. The application predicts the resale value of used cars using a trained Machine Learning model based on the CarDekho vehicle dataset.

Designed with a clean, responsive interface and interactive data visualizations, the system enables users to estimate used car prices, explore the dataset, compare machine learning models, and generate detailed performance reports.


✨ Features

  • 🚗 Predict used car resale prices instantly
  • 🤖 Machine Learning-powered price estimation
  • 📊 Interactive model performance visualizations
  • 📈 Multiple regression model comparison
  • 📂 CarDekho vehicle dataset explorer
  • 📄 Download machine learning performance report (PDF)
  • ⚡ Fast prediction with trained model
  • 📱 Fully responsive design
  • 🎨 Modern UI with smooth animations
  • 🔍 Dynamic brand & model selection
  • 📉 Performance metrics comparison
  • 🌍 Cross-platform deployment ready

🖥️ Screenshots

🏠 Home Page

Home Page


🚗 Prediction Page

Prediction Page


📊 Model Performance

Performance Page


🧠 Machine Learning Models

The application evaluates multiple regression algorithms and selects the best-performing model based on prediction accuracy.

Models compared:

  • Decision Tree Regressor
  • Gradient Boosting Regressor
  • Linear Regression
  • Random Forest Regressor

The best model is automatically selected for final price prediction.


📈 Evaluation Metrics

Model performance is evaluated using:

  • R² Score
  • Mean Absolute Error (MAE)
  • Root Mean Squared Error (RMSE)

Interactive charts are generated using Chart.js for easy comparison.


📂 Dataset

The project uses the CarDekho Used Car Dataset, containing thousands of vehicle listings with attributes such as:

  • Brand
  • Model
  • Manufacturing Year
  • Seller Type
  • Fuel Type
  • Transmission
  • Owner Type
  • Kilometers Driven
  • Mileage
  • Engine Capacity
  • Maximum Power
  • Number of Seats
  • Selling Price

The dataset is preprocessed before training to improve prediction performance.


💻 Technology Stack

Frontend

  • HTML5
  • CSS3
  • JavaScript

Backend

  • Python
  • Flask

Machine Learning

  • Scikit-learn
  • Pandas
  • NumPy
  • Joblib

Data Visualization

  • Chart.js
  • Matplotlib

Report Generation

  • ReportLab

Deployment

  • Gunicorn
  • Render

🚀 Installation

Clone the repository

git clone https://github.com/yourusername/Car-Price-Prediction.git

Move into the project

cd Car-Price-Prediction

Create virtual environment

python -m venv venv

Activate virtual environment

Windows

venv\Scripts\activate

Linux / macOS

source venv/bin/activate

Install dependencies

pip install -r requirements.txt

Run the application

python app.py

Open your browser

http://127.0.0.1:5000

🎯 How It Works

  1. Enter vehicle details.
  2. Select the car brand and model.
  3. Provide technical specifications.
  4. Click Predict Price.
  5. The trained Machine Learning model estimates the resale price.
  6. Explore dataset insights and compare model performance.

📊 Performance Highlights

  • Fast prediction response
  • Responsive user interface
  • Clean architecture using Flask Blueprints
  • Production-ready deployment
  • Interactive performance analysis
  • Automatic report generation

📄 Report Generation

The application allows users to download a professionally formatted Machine Learning performance report containing:

  • Best-performing model
  • R² comparison
  • RMSE comparison
  • MAE comparison
  • Model summary

🌟 Future Improvements

  • Deep Learning models
  • Real-time vehicle market trends
  • Price prediction confidence intervals
  • Regional price analysis
  • Advanced filtering and search
  • Model retraining with updated datasets
  • REST API support

📜 License

This project is licensed under the MIT License.


⭐ Support

If you found this project useful, please consider giving it a ⭐ Star on GitHub.

About

Machine Learning-based Car Price Prediction web application built with Flask, Scikit-learn, HTML, CSS, and JavaScript using the CarDekho dataset.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages