CoolFace
Apppublic

Ahmed99a/cough-audio-fastapi

sourceHugging Faceupdated 6mo agoView on Hugging Face
0likes
App README

COVID Cough Clinical Support

Prototype FastAPI application for cough-audio analysis as physician decision support.

Before you run or deploy

Copy these training artifacts into the artifacts/ folder:

  • —model.pkl
  • —scaler.pkl
  • —label_encoder.pkl
  • —feature_columns.json
  • —config.json

Local run

bash
pip install -r requirements.txt
uvicorn app:app --host 0.0.0.0 --port 7860 --reload

Then open:

  • —http://127.0.0.1:7860/
  • —http://127.0.0.1:7860/health

Hugging Face Spaces

  1. 1.Create a new Docker Space.
  2. 2.Upload all files from this folder.
  3. 3.Put your five artifacts inside artifacts/.
  4. 4.Wait for the build to finish.
  5. 5.Open the Space URL and test recording/upload.

Endpoints

  • —GET / : recording and upload page
  • —GET /health : service health and artifact status
  • —POST /predict : upload audio file for inference
  • —POST /reload-artifacts : reload artifacts after copying them

Important note

This app is a prototype clinical support tool and must not be used as a standalone diagnosis.