# Used Car Price Prediction – Tunisian Market (Automobile.tn)
**End-to-End MLOps Project**
Predicting fair market prices for used cars in Tunisia using real-time data scraped from automobile.tn
## 🎯 Problem Description (Business & ML Objective)
The Tunisian used car market suffers from **lack of transparency**:
- Sellers frequently overprice vehicles due to limited visibility into real market values
- Buyers have no reliable way to assess whether a listed price is fair
- No up-to-date, data-driven tool exists that accounts for local specifics (governorate, fuel type, mileage in km, year, gearbox, etc.)
**This project solves** the problem by delivering:
1. Automated scraping of current listings from automobile.tn
2. Structured storage in a MySQL star schema
3. A high-accuracy regression model (LightGBM) to predict price in TND
4. A production-ready REST API for real-time price predictions
5. Full MLOps stack: experiment tracking (MLflow), orchestration (Prefect), monitoring (Evidently), containerization (Docker), cloud deployment (Render)
**Target users**:
- Private buyers → instantly check if a car is fairly priced
- Sellers & dealers → set competitive, data-informed prices
- Market analysts → understand key price drivers in Tunisia
**Success metrics**:
- Model performance: RMSE 0.85 (on cleaned data)
- End-to-end reproducibility & observability via MLOps tools
## 🏗 Project Architecture (End-to-End MLOps Pipeline)
[Scraping (Selenium + BS4)] → car_listings.json
↓
[ETL → MySQL star schema] → car_data database
↓
[Cleaning + Feature Engineering]
↓
[Model Training (LightGBM + GridSearchCV + SHAP)] → car_price_model.joblib
↓
[Experiment tracking & registry (MLflow)]
↓
[FAISS semantic index (similarity search)]
↓
[Flask REST API (/predict endpoint)]
↓
[Monitoring (Evidently AI – drift detection + alerts)]
↓
[Orchestration (Prefect 2 – fully deployed local workflow)]
↓
[Containerized deployment (Docker + Render.com)]
text## 🚀 Quick Start (Local)
### Prerequisites …