pandeydigant31's picture
Initial deploy: DELPHI Pump Analytics (renamed from MURPHY)
199bfa3 verified
|
Raw
History Blame Contribute Delete
2.14 kB
---
title: CSH2 DELPHI Pump Analytics
emoji: ⚙️
colorFrom: yellow
colorTo: gray
sdk: docker
app_file: app.py
pinned: false
---
# CSH2 DELPHI -- Pump Analytics Dashboard
Interactive Streamlit dashboard for the CSH2 cryogenic hydrogen pump test platform.
Connects to TimescaleDB for real-time and historical sensor analytics across 74 sensors,
with LLM-powered diagnostic analysis via Claude API.
## Pages
1. **Data Explorer** -- Browse sensor time-series with NL query support (ask in plain English)
2. **Testing Cycles** -- Browse pre-computed pump test cycles with summary metrics
3. **Cycle Detail** -- Deep-dive into a single cycle with multi-sensor overlay plots
4. **Variation Analysis** -- LLM-powered analysis of within-cycle stabilizations and variations
5. **Cycle Comparison** -- Side-by-side comparison of two cycles with LLM diagnostic commentary
6. **Advanced Data Explorer** -- NL-to-SQL analytical pipeline with structured operation execution
## Secrets (Required)
Set these as Space Secrets in the HuggingFace Space settings:
| Secret | Description |
|--------|-------------|
| `DB_HOST` | TimescaleDB hostname |
| `DB_PORT` | Connection port |
| `DB_NAME` | Database name |
| `DB_USER` | Read-only database user |
| `DB_PASSWORD` | Database password |
| `ANTHROPIC_API_KEY` | Claude API key (optional -- pages 1-3 work without it) |
Without `ANTHROPIC_API_KEY`, the NL query parser (page 1), variation analysis (page 4),
cycle comparison (page 5), and advanced explorer interpretation (page 6) will show a
graceful fallback message. All data browsing and charting works without it.
## Architecture
- `core/config.py` -- Reads secrets from `st.secrets` (Streamlit Cloud / HF Spaces) first, falls back to `os.environ` / `.env`
- `core/db_connector.py` -- Singleton PostgreSQL connector with smart table routing (raw / 1sec / 15sec aggregates)
- `analysis/` -- LLM analyzer, NL-to-SQL parser, domain knowledge YAML retriever, cycle detection
- `ui/` -- Custom HUD-themed components, Plotly chart builders, CSS injection
- `pages/` -- Streamlit multi-page app (6 pages)
Built for Clear Skies Hydrogen (CSH2).