CoolFace
Apppublic

liammatt5/GLAM_Web_App

sourceHugging Facemitupdated 3mo agoView on Hugging Face
0likes
README.md103 linesDownload Raw Back to root
1---2title: GLAM Web App3emoji: ๐Ÿ“ˆ4colorFrom: green5colorTo: purple6sdk: gradio7sdk_version: 6.18.08python_version: '3.13'9app_file: app.py10pinned: false11license: mit12short_description: Respiratory monitoring model13---14 15 16# GLAM Pipeline17 18This repository includes a respiratory audio separation pipeline built around a local SepFormer model and a clinical reasoning/GNN inference path.19 20## Key Files21 22### model.py23 24Loads the SepFormer separation model using local pretrained files in `pretrained_sepformer`.25 26Wraps encoder/masknet/decoder into `UnifiedSepFormer`.27 28### interface.py29 30Provides shared audio loading, separation, and saving helpers.31 32Includes:33 34* `separate_audio_file(...)`35* `predict_sources(...)`36* `save_separated_sources(...)`37 38for pipeline reuse.39 40Still supports the existing Gradio UI workflow via:41 42* `separate_audio(...)`43 44### pipeline.py45 46Runs separation over a directory of mixture audio files.47 48Writes separated WAVs and waveform PNGs to an output folder.49 50Produces:51 52* `pipeline_summary.json`53* `pipeline_summary.csv`54 55### gnn.py56 57Defines the GNN model architecture used for respiratory audio reasoning.58 59Provides utilities for:60 61* loading a GNN checkpoint62* estimating breathing rate63* patient state tracking64* clinical alert generation65 66### reasoning_pipeline.py67 68Processes GNN run outputs:69 70* `window_report.json`71* `window_report.csv`72 73Generates reasoning summary CSV/JSON files.74 75Includes visualization helpers for per-patient summary plots.76 77### full_pipeline.py78 79Runs the complete flow:80 811. Separate mixture audio files822. Run Wav2Vec2 + GNN inference833. Save per-run artifacts844. Aggregate reasoning summaries85 86## Running a Simulation87To test the system using the provided sample data:88 891. Open the Patient Registration page.902. Navigate to the Sample_Audio folder.913. Upload S1, S2, and S3 as individual patient recordings.924. Click Register to register each patient.93 94Next:95 961. Open the Separation page.972. Upload Sample_0_mix.wav from the Sample_Audio folder as the mixed audio recording.983. Select the registered patients (S1, S2, and S3).994. Click Run Separation.100 101 102Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference103