How phnxlabs/broad-ecg2af works
This Gradio app accepts an HD5 ECG upload and returns four predictions: incident atrial-fibrillation survival, sex, age, and atrial-fibrillation classification. Its runtime flow validates the upload, converts ECG leads into a normalized tensor, runs a pretrained TensorFlow model, interprets the outputs, and displays sliders and probability charts. The runner reads configuration and wires the model, processor, visualizer, and interface. The README documents these capabilities; no separate storage or asynchronous processing subsystem is implemented.
Main entry points: interface.py Gradio interface · run_app.py App runner · model_handler.py ECG model · ecg_processor.py HD5 preprocessing
Components 9
User interface
- Gradio interface
app/interface.py - Prediction formatting
app/interface.py
ECG inference
- HD5 preprocessing
app/ecg_processor.py - ECG model
app/model_handler.py - Probability charts
app/visualizer.py
Runtime setup
- App runner
scripts/run_app.py - App configuration
config/config.yaml
Other components
- ECG user
- TensorFlow runtime
Connections 12
- ECG user → Gradio interface: uploads HD5
README.md - Gradio interface → HD5 preprocessing: preprocesses file
app/interface.py - Gradio interface → ECG model: requests predictions
app/interface.py - Gradio interface → Prediction formatting: formats predictions
app/interface.py - Prediction formatting → Probability charts: renders charts
app/interface.py - Gradio interface → ECG user: displays results
README.md - ECG model → TensorFlow runtime: loads and predicts
app/model_handler.py - App runner → App configuration: reads settings
scripts/run_app.py - App runner → ECG model: initializes
scripts/run_app.py - App runner → HD5 preprocessing: initializes
scripts/run_app.py - App runner → Probability charts: initializes
scripts/run_app.py - App runner → Gradio interface: launches
scripts/run_app.py