Spaces:
Sleeping
Sleeping
File size: 1,119 Bytes
2af1d9f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | ---
title: OC P8 Monitoring
emoji: π
colorFrom: green
colorTo: yellow
sdk: docker
app_port: 7860
pinned: false
---
# OC P8 β Monitoring Dashboard
Streamlit dashboard for the Credit Scoring API. Reads logs from Supabase
(`predictions_log`) and an Evidently HTML report embedded in `static/`.
## Run locally
```powershell
$env:DATABASE_URL = "postgresql://..."
uv run streamlit run dashboard/app.py
```
## Build & test the container locally
```powershell
docker build -t oc-p8-monitoring -f dashboard/Dockerfile dashboard
docker run -p 7860:7860 -e DATABASE_URL="postgresql://..." oc-p8-monitoring
```
## Deploy to HF Space `KLEB38/OC_P8_monitoring`
```powershell
$env:HF_TOKEN = "hf_..."
uv run python scripts/deploy_dashboard.py
```
`DATABASE_URL` must be added as a Space secret (Settings β Variables and
secrets β New secret).
## Regenerate the drift report
```powershell
uv run python scripts/generate_drift_report.py --days 30
```
The resulting HTML is written to `dashboard/static/drift_report.html` and
picked up by the dashboard automatically.
|