Interactive house price predictor for Tunisia using ML
# Tunisian House Price Predictor
An end-to-end, production-ready machine learning microservice for predicting real estate prices in Tunisia. Built with **Scikit-Learn/XGBoost/LightGBM**, orchestrated via **ZenML**, tracked by **MLflow**, served via a **FastAPI** REST backend, and visualized through a premium **React (Vite)** frontend and an alternative **Streamlit** dashboard.
## 🌟 Key Features
- **Tunisian Market Focus**: Trained on real scraped data from Tayara, Menzili, and Mubawab across multiple Tunisian cities (Tunis, Ariana, Sousse, Sfax, etc.).
- **Microservices Architecture**: Fully decoupled frontend (React/Streamlit) and backend (FastAPI) wrapped in Docker containers.
- **Advanced Machine Learning**: Compares multiple models including XGBoost, LightGBM, Random Forest, Gradient Boosting, Ridge, and Lasso.
- **Explainable AI (XAI)**: Integrated **SHAP** (SHapley Additive exPlanations) for global and local feature importance.
- **Premium Frontend**: A custom-built React application featuring dark mode, glassmorphism, dynamic micro-animations, and interactive price sensitivity charts.
### App Previews
---
## 🏗️ Architecture
```mermaid
flowchart LR
subgraph MLOps Pipeline
Data[Raw Data] --> ZenML[ZenML Pipelines]
ZenML --> Train[Model Training]
Train --> MLflow[MLflow Tracking]
Train --> Export[model.pkl]
end
subgraph Docker Containers
API[FastAPI Backend\nPort 8000]
React[React Frontend\nPort 5173]
Streamlit[Streamlit App\nPort 8501]
Export -.-> API
React -- POST /predict --> API
Streamlit -- POST /predict --> API
end
```
---
## 🚀 Quick Start (Docker)
The absolute easiest way to run this project is via Docker Compose.
1. Clone the repository:
```bash
git clone
github.com
cd tunisian-house-price-predictor
```
2. Spin up the entire microservices stack:
```bash
docker-compose up --build
```
3. Access the services:
- **Premium React App**:
localhost
- **Streamlit App* …