Spaces:
Running
Running
metadata
license: mit
sdk: gradio
colorFrom: yellow
colorTo: green
sdk_version: 6.0.2
Sundew Health Backend
Neurosymbolic, energy-aware ECG monitoring backend using FastAPI, PyTorch, and PostgreSQL.
Quickstart
- Create a
.envfrom.env.exampleand setDATABASE_URL. - Install dependencies (CPU PyTorch wheels):
pip install -e . --extra-index-url https://download.pytorch.org/whl/cpu. - Run the API:
uvicorn app.main:app --reload.
Database (PostgreSQL + Alembic)
- Set
DATABASE_URLto your Postgres DSN (e.g.,postgresql+asyncpg://user:pass@localhost:5432/sundew_health). - Run migrations:
alembic upgrade head. - Create new migrations:
alembic revision -m "message" --autogenerate.
Tests
Run pytest to execute the test suite.
Notes
- Gating uses
sundew-algorithms(significance + hysteresis) ahead of model inference. - Adaptive Sparse Training (
adaptive-sparse-training) is installed; torch shims are applied to load it, but training still uses the simpler loop until AST wiring is added.