Spaces:
Runtime error
Runtime error
updated README again
Browse files
README.md
CHANGED
|
@@ -10,10 +10,13 @@ pinned: false
|
|
| 10 |
---
|
| 11 |
|
| 12 |
# π§ NMS Dementia Risk Assessment API
|
| 13 |
-
**AI Backend for the NMS Mobile App & Web Platform**
|
|
|
|
| 14 |
|
| 15 |
This repository contains the **agentic AI backend** powering dementia risk assessment and personalized news delivery for the NMS ecosystem. Built on [**CrewAI**](https://crewai.com), it provides scalable, explainable, and audience-aware intelligence for patients, caregivers, and clinicians.
|
| 16 |
|
|
|
|
|
|
|
| 17 |
---
|
| 18 |
|
| 19 |
## β
Core Capabilities
|
|
@@ -39,8 +42,8 @@ The system uses **4 specialized agents**, each with dedicated tools and LLMs:
|
|
| 39 |
|-------|------|-----|-------|
|
| 40 |
| `Risk Calculator (Audio)` | Runs XGBoost model + SHAP on speech features | `gpt-oss-120b` | `calculate_dementia_risk_audio`, `explain_dementia_risk_audio` |
|
| 41 |
| `Risk Calculator (Lifestyle)` | Runs XGBoost model + SHAP on lifestyle data | `gpt-oss-120b` | `calculate_dementia_risk_lifestyle`, `explain_dementia_risk_lifestyle` |
|
| 42 |
-
| `Patient News Agent` | Fetches, scrapes, and summarizes news for patients/caregivers | `
|
| 43 |
-
| `Doctor News Agent` | Fetches, scrapes, and summarizes research for clinicians | `
|
| 44 |
|
| 45 |
> π **Why agents?**
|
| 46 |
> - Separation of concerns (prediction vs. information retrieval)
|
|
@@ -52,9 +55,9 @@ The system uses **4 specialized agents**, each with dedicated tools and LLMs:
|
|
| 52 |
## π οΈ Key Technologies
|
| 53 |
|
| 54 |
- **Machine Learning**: XGBoost (v3.0.5) for high-accuracy binary classification
|
| 55 |
-
- **
|
| 56 |
- **Web Scraping**: `requests` + `BeautifulSoup4` (with fallbacks for dynamic sites)
|
| 57 |
-
- **LLM Orchestration**: LiteLLM + Hugging Face Inference API (`
|
| 58 |
- **Data Pipeline**: Firebase (Firestore for lifestyle, Storage for audio/transcripts)
|
| 59 |
- **Deployment**: Hugging Face Spaces (Gradio frontend + CrewAI backend)
|
| 60 |
|
|
@@ -72,11 +75,15 @@ The system uses **4 specialized agents**, each with dedicated tools and LLMs:
|
|
| 72 |
## π Ethical & Technical Notes
|
| 73 |
|
| 74 |
- All predictions undergo **SHAP-based validation** to ensure model fairness and transparency.
|
| 75 |
-
- News scraping respects `robots.txt` and uses rate-limiting; open-access/Europe PMC sources prioritized.
|
| 76 |
- No personally identifiable information (PII) leaves Firebase β all processing is anonymized.
|
| 77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
---
|
| 79 |
|
| 80 |
> π‘ **Developed by** [plutoa386](https://huggingface.co/plutoa386)
|
| 81 |
-
> π **Live Demo**: [Hugging Face Space](https://huggingface.co/spaces/plutoa386/nms-
|
| 82 |
> π¦ **Models**: `modelAudiov8_ML.json`, `modelLifestyleV3_ML.json` (XGBoost + SHAP-compatible)
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
# π§ NMS Dementia Risk Assessment API
|
| 13 |
+
**AI Backend for the NMS Mobile App & NMS Web Platform**
|
| 14 |
+
**3rd Year Uni Project**
|
| 15 |
|
| 16 |
This repository contains the **agentic AI backend** powering dementia risk assessment and personalized news delivery for the NMS ecosystem. Built on [**CrewAI**](https://crewai.com), it provides scalable, explainable, and audience-aware intelligence for patients, caregivers, and clinicians.
|
| 17 |
|
| 18 |
+
This is my contribution to the NMS group project.
|
| 19 |
+
|
| 20 |
---
|
| 21 |
|
| 22 |
## β
Core Capabilities
|
|
|
|
| 42 |
|-------|------|-----|-------|
|
| 43 |
| `Risk Calculator (Audio)` | Runs XGBoost model + SHAP on speech features | `gpt-oss-120b` | `calculate_dementia_risk_audio`, `explain_dementia_risk_audio` |
|
| 44 |
| `Risk Calculator (Lifestyle)` | Runs XGBoost model + SHAP on lifestyle data | `gpt-oss-120b` | `calculate_dementia_risk_lifestyle`, `explain_dementia_risk_lifestyle` |
|
| 45 |
+
| `Patient News Agent` | Fetches, scrapes, and summarizes news for patients/caregivers | `Qwen3-4B-Thinking-2507` | `gather_news_patient` |
|
| 46 |
+
| `Doctor News Agent` | Fetches, scrapes, and summarizes research for clinicians | `Qwen3-4B-Thinking-2507` | `gather_news_doctor` |
|
| 47 |
|
| 48 |
> π **Why agents?**
|
| 49 |
> - Separation of concerns (prediction vs. information retrieval)
|
|
|
|
| 55 |
## π οΈ Key Technologies
|
| 56 |
|
| 57 |
- **Machine Learning**: XGBoost (v3.0.5) for high-accuracy binary classification
|
| 58 |
+
- **XAI (Explainable AI)**: SHAP TreeExplainer for model-agnostic, global + local interpretability
|
| 59 |
- **Web Scraping**: `requests` + `BeautifulSoup4` (with fallbacks for dynamic sites)
|
| 60 |
+
- **LLM Orchestration**: LiteLLM + Hugging Face Inference API (`Qwen/Qwen3-4B-Thinking-2507`, `openai/gpt-oss-120b`)
|
| 61 |
- **Data Pipeline**: Firebase (Firestore for lifestyle, Storage for audio/transcripts)
|
| 62 |
- **Deployment**: Hugging Face Spaces (Gradio frontend + CrewAI backend)
|
| 63 |
|
|
|
|
| 75 |
## π Ethical & Technical Notes
|
| 76 |
|
| 77 |
- All predictions undergo **SHAP-based validation** to ensure model fairness and transparency.
|
|
|
|
| 78 |
- No personally identifiable information (PII) leaves Firebase β all processing is anonymized.
|
| 79 |
|
| 80 |
+
|
| 81 |
+
## βΌοΈ Disclaimer
|
| 82 |
+
- **This README was generated by AI**
|
| 83 |
+
- The webscraping is mid
|
| 84 |
+
|
| 85 |
---
|
| 86 |
|
| 87 |
> π‘ **Developed by** [plutoa386](https://huggingface.co/plutoa386)
|
| 88 |
+
> π **Live Demo**: [Hugging Face Space](https://huggingface.co/spaces/plutoa386/nms-ai-dev)
|
| 89 |
> π¦ **Models**: `modelAudiov8_ML.json`, `modelLifestyleV3_ML.json` (XGBoost + SHAP-compatible)
|