Spaces:
Sleeping
Sleeping
File size: 3,636 Bytes
29859f5 9a47985 29859f5 9a47985 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
---
title: Astral.AI
emoji: π
colorFrom: pink
colorTo: red
sdk: gradio
sdk_version: 5.37.0
app_file: app.py
pinned: false
license: afl-3.0
short_description: An AI Powered Tracker
---
# π©Ί Pediatric Respiratory Triage Assistant (NLP-Powered)
An intelligent, interactive assistant that helps parents and caregivers **triage common pediatric respiratory symptoms**.
Built using interpretable machine learning, custom NLP pipelines, and deployed with a friendly **Gradio chatbot interface**.
> β οΈ This tool provides **non-diagnostic guidance** only. It is not a substitute for medical advice.
---
## π Live Demo
Try the app on [Hugging Face Spaces](https://huggingface.co/spaces/your-username/pediatric-triage)
*(replace with actual URL when deployed)*
---
## π― Project Objective
- Enable users to describe symptoms in **natural language**
- Use an ML model to classify input into **one of four triage levels**
- Return a **safe, easy-to-understand recommendation**
- Support early triage decisions, especially in low-resource or high-volume contexts
---
## π§ How It Works
1. User enters a free-text symptom description
2. The text is processed via `TF-IDF` vectorization
3. A **Decision Tree classifier** predicts the triage category
4. A friendly chatbot message is displayed based on the prediction
### Triage Labels:
| Label | Guidance |
|--------------------|-------------------------------------------------------------------------|
| π’ Monitor at Home | Mild symptoms, low risk. Watch and observe. |
| π‘ Consult GP | Suggests seeing a doctor for further evaluation. |
| π« Use Inhaler | Asthma-like symptoms. Use prescribed inhaler and monitor closely. |
| π΄ Visit Emergency | Serious symptoms. Seek urgent medical attention. |
---
## π§ͺ Model Summary
- Vectorizer: `TfidfVectorizer` with bigrams
- Best model: `DecisionTreeClassifier` (Accuracy: 96%)
- Other tested models: Linear SVM, XGBoost, LightGBM, Random Forest
---
## ποΈ Files in This Repo
```mathematica
βββ app.py # Gradio app entry point
βββ best_model_decision_tree.joblib # Trained ML model
βββ requirements.txt # All required libraries
βββ README.md # You're reading it
```
---
## π§° Tech Stack
- `Gradio` β chatbot interface
- `Scikit-learn` β model training + TF-IDF pipeline
- `XGBoost`, `LightGBM`, `Random Forest` β tested alternates
- `Joblib` β model persistence
- `Matplotlib`, `Seaborn` β EDA & diagnostics
---
## π§ Limitations
- Not a diagnostic system β designed only for **low-risk triage advice**
- Based on synthetic and heuristic-labeled data from medical education text
- Requires expansion for multilingual or multi-condition support
---
## π§ Future Plans
- Integrate BERT for deeper semantic understanding
- Add class weighting or active learning
- Train on verified clinical text or real-world triage logs
- Publish as an embeddable widget or API
---
## β οΈ Disclaimer
This project is for educational and research purposes only. It is not a certified medical device or diagnostic tool.
Always consult a licensed healthcare provider for professional medical advice.
---
## π License
MIT License β feel free to modify, fork, and improve responsibly.
---
## π Credits
Built with β€οΈ by [SilverDragon9](https://huggingface.co/SilverDragon9)
Inspired by pediatricians, caregivers, and the need for accessible, responsible healthcare AI.
|