Production-ready ML pipeline for Tunisian house prices: web scraping, data preprocessing, XGBoost modeling, MLflow tracking and model registry, FastAPI API deployment, and Docker containerization.
# 🏠 House Price Prediction in Tunisia
This project is an **end-to-end machine learning pipeline** to predict house prices in Tunisia using historical real estate listings. It covers **data collection, preprocessing, feature engineering, exploratory analysis, model experimentation, MLflow tracking, model registry, FastAPI deployment, and Dockerization**.
The main goal is to provide **reliable price predictions** for properties given their surface area, number of rooms, location (governorate), and property type.
---
## Table of Contents
1. Overview
2. Project Structure
3. Data Collection
4. Web Scraping with Scrapy
5. Data Preprocessing
6. Exploratory Data Analysis (EDA)
7. Modeling
8. Experiment Tracking with MLflow
9. Model Registry
10. FastAPI Deployment
11. Docker Deployment
12. Project Pipeline
13. Getting Started
---
## Overview
This project predicts house prices in Tunisia using features such as:
- Surface area (m²)
- Number of rooms
- Governorate (location)
- Property type (apartment or house)
The project showcases **MLOps practices** by integrating **MLflow**, **FastAPI**, and **Docker** for reproducible experiments and production deployment.
---
## Project Structure
```
House_Price_Prediction/
│
├── data/
│ ├── raw/ # Original CSVs scraped from websites
│ │ ├── mubawab.csv
│ │ ├── tayara.csv
│ │ └── immobilier.csv
│ └── clean/ # Cleaned CSVs ready for modeling
│
├── housescraper/ # Scrapy spiders, items, and pipelines
│
├── notebooks/
│ ├── 1_data_preprocessing.ipynb
│ ├── 2_eda.ipynb
│ ├── 3_modeling.ipynb
│ ├── 4_tracking.ipynb
│ └── 5_model_registry.ipynb
│
├── fastapi_app.py # FastAPI API serving the production model
├── Dockerfile # Docker setup for the API
├── requirements.txt # Full Python dependencies for development
├── requirements-prod.txt # Production dependencies
└── README.md
```
---
## D …