Spaces:
Running
A newer version of the Gradio SDK is available: 6.19.0
title: GLAM Web App
emoji: 📈
colorFrom: green
colorTo: purple
sdk: gradio
sdk_version: 6.18.0
python_version: '3.13'
app_file: app.py
pinned: false
license: mit
short_description: Respiratory monitoring model
GLAM Pipeline
This repository includes a respiratory audio separation pipeline built around a local SepFormer model and a clinical reasoning/GNN inference path.
Key Files
model.py
Loads the SepFormer separation model using local pretrained files in pretrained_sepformer.
Wraps encoder/masknet/decoder into UnifiedSepFormer.
interface.py
Provides shared audio loading, separation, and saving helpers.
Includes:
separate_audio_file(...)predict_sources(...)save_separated_sources(...)
for pipeline reuse.
Still supports the existing Gradio UI workflow via:
separate_audio(...)
pipeline.py
Runs separation over a directory of mixture audio files.
Writes separated WAVs and waveform PNGs to an output folder.
Produces:
pipeline_summary.jsonpipeline_summary.csv
gnn.py
Defines the GNN model architecture used for respiratory audio reasoning.
Provides utilities for:
- loading a GNN checkpoint
- estimating breathing rate
- patient state tracking
- clinical alert generation
reasoning_pipeline.py
Processes GNN run outputs:
window_report.jsonwindow_report.csv
Generates reasoning summary CSV/JSON files.
Includes visualization helpers for per-patient summary plots.
full_pipeline.py
Runs the complete flow:
- Separate mixture audio files
- Run Wav2Vec2 + GNN inference
- Save per-run artifacts
- Aggregate reasoning summaries
Running a Simulation
To test the system using the provided sample data:
- Open the Patient Registration page.
- Navigate to the Sample_Audio folder.
- Upload S1, S2, and S3 as individual patient recordings.
- Click Register to register each patient.
Next:
- Open the Separation page.
- Upload Sample_0_mix.wav from the Sample_Audio folder as the mixed audio recording.
- Select the registered patients (S1, S2, and S3).
- Click Run Separation.
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference