This accelerator provisions an Azure environment consisting of frontend (Streamlit) and backend (FastAPI) Container Apps with some mock data for proof of concept or demonstration purposes.
The full solution, including infrastructure provisioning, application builds and deployments can be initiated using the
Azure Developer CLI (azd):
# Authenticate to Azure
azd auth login
# Full deployment
azd upTo provision/update the infrastructure only, run:
# Only provision infrastructure
azd provisionTo build/deploy the applications only, run:
# Build/package all apps
azd package
# Deploy all apps
azd deployThe solution can be developed locally in containers, and so requires Docker and Docker Compose to be installed:
# Ensure the Docker daemon is running (run in a separate terminal window)
sudo dockerd
# Build/start all apps
cd ./src
docker compose up --build
# Frontend: https://localhost:8051
# Backend: https://localhost:8052Both the frontend and backend apps will update live, so any code changes will be reflected in the running container and in the local browser immediately.
The platform now includes a "Model Explainability Lab" demo accessible via the Streamlit frontend. It showcases end-to-end exploratory model insight flows using static, precomputed artifacts for two datasets:
Datasets:
iris(multiclass classification)titanic(binary classification)
Backend endpoints (FastAPI):
GET /datasets– list available datasetsGET /schema?dataset=...– schema (features, target, classes)POST /train– returns metrics, ROC curve, confusion matrix, importancesPOST /predict– mock prediction for supplied feature valuesPOST /explain– SHAP-like contributions (stored row or ad-hoc features)GET /pdp?dataset=...&feature=...– partial dependence dataGET /healthz– health probe
Frontend tabs:
- Performance: ROC + confusion matrix heatmap
- Importances: Bar chart of feature importances
- What-If: Editable feature inputs → prediction probabilities
- Explanations: Stored row and ad-hoc SHAP-like contribution bars
- PDP: Feature-level partial dependence line chart
How to run locally (backend only for quick test):
uvicorn backend.app:app --reload --port 8000Then start Streamlit frontend (if not using Docker Compose):
streamlit run src/frontend/app.pyTesting backend endpoints:
pytest -q src/backend/testsAll model outputs are deterministic and sourced from JSON under src/backend/data/. Replace or augment these files to plug in new datasets.