Carvo β ML-powered web app that predicts used car prices in Egypt using XGBoost, with user accounts and prediction history.
# π CARVO β Egyptian Car Price Predictor
Know your car's true value.
Instant, accurate price prediction for the Egyptian car market β powered by machine learning and trained on real local data.
---
## π About
**Carvo** is a full-stack web application built with **Flask** that predicts the fair market price of used cars
in Egypt. It uses a trained **XGBoost** regression model to turn a few simple inputs β brand, model, year,
mileage, city, and more β into an instant, data-driven price estimate.
Beyond the prediction engine, Carvo ships with a complete user system: secure registration and login, a
personal prediction history, and a profile dashboard β so every estimate you make is saved and easy to revisit.
---
## πΌοΈ Screenshots
Home page
Prediction result page
---
## β¨ Features
- π **Full user authentication** β register, log in, and update account details, with passwords securely hashed via `werkzeug`.
- π€ **Machine learning model (XGBoost)** for accurate car price predictions.
- π·οΈ **Dynamic brand/model selection** β car models update automatically based on the selected brand via an internal API.
- π§ **Smart feature engineering**, including:
- Car age (`car_age`)
- Average kilometers driven per year (`km_per_year`)
- Automatic flags for luxury, Chinese, and electric brands
- π **Per-user prediction history**, stored in a SQLite database.
- π€ **Profile dashboard** to view/edit account details and browse past predictions.
- π **JSON API endpoints** (`/api/predict`, `/api/models/ `) for AJAX-driven, asynchronous requests.
---
## π οΈ Tech Stack
| Category | Technology |
|---|---|
| Backend | Python, Flask |
| Machine Learning | XGBoost, scikit-learn, pandas, NumPy |
| Database | SQLite3 |
| Security | Werkzeug (password hashing) |
| Frontend | HTML, CSS, JavaScript (Jinja2 templates) |
---
## π Project Structure
```
car_price/
βββ model/ # Trained XGBoost model + encoders
β βββ xgb_egypt_model.pkl
βββ static/ β¦