This repository includes all core functionalities along with a beta dashboard for testing and development purposes. For a more lightweight and production-ready frontend, check out the enhanced version here:
This project predicts network throughput β a key indicator of Quality of Service (QoS) in 5G networks β using machine learning. It features a full MLOps pipeline with MLflow tracking, Elasticsearch-based evaluation dashboards, SHAP explainability, and GPT-powered QoS insights. The system runs on a fully Dockerized stack using FastAPI and a simple web frontend for real-time use.
This work was developed as part of the Integrated Project at Esprit School of Engineering, under the guidance of professors Rahma Bouraoui, Safa Cherif, and Zaineb Labidi.
- Upload CSV to get QoS predictions
- GPT-powered explanations with SHAP insights
- Caching avoids repeated GPT API calls
- Export results as PDF
- FastAPI for predictions, explainability, and GPT summaries
- Uses SHAP values to explain model decisions
- GPT-4o via GitHub API creates human-readable reports
- PostgreSQL stores predictions & insights
- Data preprocessing, model training, evaluation
- MLflow logs parameters, metrics, and artifacts
- Elasticsearch logs evaluation metrics for monitoring dashboards
- Simple CLI via
Makefilecommands
πΌοΈ Kibana Evaluation Dashboard:
βββ static/ # Frontend HTML + JS
βββ services/ # SHAP explainability + GPT interpretation logic
βββ Dataset/ # Training and test data (CSV)
βββ Models/ # Saved models and processed data
βββ assets/ # Visuals (e.g. Elastic dashboard screenshots)
βββ testinput/ # Example input for testing predictions
βββ app.py # FastAPI server
βββ main.py # MLOps training & evaluation pipeline
βββ model_pipeline.py # Sklearn training, preprocessing, evaluation
βββ csvv.py # CSV parsing logic
βββ docker-compose.yml # Orchestrates app + DB + Elasticsearch + MLflow
βββ Dockerfile # Container for FastAPI + logic
βββ Makefile # CLI commands for training, evaluation, etc.
βββ requirements.txt # Python dependencies
βββ .env.example # Example environment variable file
βββ .flake8 / .pre-commit/ # Code quality configuration
βββ README.md # Project overview and instructions
# Clone repo
git clone https://github.com/RideneFiras/QosMLOPS.git
cd QosMLOPS
# Create and activate a virtual environment (recommended)
python -m venv qos
source qos/bin/activate
# Install Python dependencies
pip install -r requirements.txt
# Train model and prepare everything
make all
# Start FastAPI and web UI
make fastapi
# Or launch entire stack with Docker
docker-compose up --buildAfter the model predicts throughput:
- SHAP explains feature impact per prediction
- GPT-4o turns SHAP values into a readable QoS summary
- Insights include:
- Overall QoS rating (e.g. Very Low β Very Good)
- Top influencing features
- Suggestions to improve performance
- Markdown is rendered cleanly in-browser
- Export as PDF with a single click
- Visit http://127.0.0.1:8000
- Upload your test CSV
- Click βExplainβ next to any result
- Read GPT-powered QoS explanation
- Save report as PDF if needed
Store these in a .env file (not tracked by git):
DATABASE_URLβ PostgreSQL connection stringGITHUB_TOKENβ GitHub token for GPT API accessIS_DOCKERβ Set totrueinside containers (used for routing)
make all # Run full pipeline: prepare β train β evaluate β predict
make train # Train the ML model and log to MLflow
make evaluate # Evaluate performance and send metrics to MLflow & Elastic
make fastapi # Start FastAPI locally (with database in background)
make services-up # Start Elasticsearch, Kibana, PostgreSQL, and MLflow (Docker)
make docker-run # Run the entire app in Docker (FastAPI + dependencies)
make docker-down # Stop all running Docker containers
make notebook # Launch Jupyter Notebook
make check # Run both code formatting (Black) and linting (Flake8)
make clean # Remove cache, .pkl files, and logs- Python & Scikit-learn
- FastAPI + SHAP + GPT-4o
- MLflow for model tracking
- Elasticsearch + Kibana for evaluation dashboards
- PostgreSQL for storing prediction results
- Tailwind CSS for styling
- Docker for deployment
This is an end-to-end, real-world MLOps project combining AI explainability, model monitoring, and GPT summarization. Designed with clarity, reliability, and user insights in mind β ready for production.

