# adithya1605p/disease_detection architecture

> Architecture diagram of the GitHub repository adithya1605p/disease_detection, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/adithya1605p/disease_detection
- Repository: https://github.com/adithya1605p/disease_detection

## Overview

VitaScan is a Streamlit dashboard for six-disease screening estimates, with a separate pipeline for training and evaluating its models. The main user flow selects a disease, loads its saved feature definition and model artifacts, collects clinical inputs, and presents an estimate with confidence and downloadable reporting. The README also documents overview metrics, example profiles, feature details, and preprocessing. Edges reflect README-described relationships; the excerpts do not show the complete app or training implementation, so internal calls are not inferred.

Main entry points: [`app.py`](https://github.com/adithya1605p/disease_detection/blob/master/app.py) (Screening estimate), [`models`](https://github.com/adithya1605p/disease_detection/tree/master/models) (Saved model artifacts), [`train_all.py`](https://github.com/adithya1605p/disease_detection/blob/master/train_all.py) (Training pipeline), [`config.py`](https://github.com/adithya1605p/disease_detection/blob/master/config.py) (Disease configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Screening dashboard"]
  node_streamlit_app["Streamlit dashboard<br/>[app.py]"]
  node_disease_select["Disease selector<br/>[app.py]"]
  node_overview["Disease overview<br/>[app.py]"]
  node_model_details["Model details<br/>[app.py]"]
end

subgraph group_inference["Screening experience"]
  node_feature_form["Clinical input form<br/>[app.py]"]
  node_example_profiles["Example profiles<br/>[app.py]"]
  node_screening["Screening estimate<br/>[app.py]"]
  node_risk_checks["Biomarker checks<br/>[app.py]"]
  node_results["Result and confidence<br/>[app.py]"]
  node_report["CSV report<br/>[app.py]"]
  node_artifacts["Saved model artifacts"]
  node_metrics["Evaluation metrics"]
end

subgraph group_training["Model training"]
  node_trainer["Training pipeline<br/>[train_all.py]"]
  node_disease_config["Disease configuration<br/>[config.py]"]
  node_datasets["Disease datasets"]
end

node_user(("Dashboard user"))

node_user -->|"uses"| node_streamlit_app
node_streamlit_app -->|"offers"| node_disease_select
node_disease_select -->|"selects disease"| node_overview
node_disease_select -->|"selects disease"| node_feature_form
node_overview -->|"shows metrics"| node_metrics
node_feature_form -->|"uses feature list"| node_artifacts
node_example_profiles -->|"populates inputs"| node_feature_form
node_feature_form -->|"submits inputs"| node_screening
node_screening -->|"uses model"| node_artifacts
node_screening -.->|"checks ranges"| node_risk_checks
node_screening -->|"returns estimate"| node_results
node_results -->|"downloads report"| node_report
node_model_details -->|"explains inputs"| node_artifacts
node_trainer -->|"loads configuration"| node_disease_config
node_trainer -->|"loads datasets"| node_datasets
node_trainer -->|"saves models"| node_artifacts

click node_streamlit_app "https://github.com/adithya1605p/disease_detection/blob/master/app.py"
click node_disease_select "https://github.com/adithya1605p/disease_detection/blob/master/app.py"
click node_overview "https://github.com/adithya1605p/disease_detection/blob/master/app.py"
click node_feature_form "https://github.com/adithya1605p/disease_detection/blob/master/app.py"
click node_example_profiles "https://github.com/adithya1605p/disease_detection/blob/master/app.py"
click node_screening "https://github.com/adithya1605p/disease_detection/blob/master/app.py"
click node_risk_checks "https://github.com/adithya1605p/disease_detection/blob/master/app.py"
click node_results "https://github.com/adithya1605p/disease_detection/blob/master/app.py"
click node_report "https://github.com/adithya1605p/disease_detection/blob/master/app.py"
click node_model_details "https://github.com/adithya1605p/disease_detection/blob/master/app.py"
click node_artifacts "https://github.com/adithya1605p/disease_detection/tree/master/models"
click node_metrics "https://github.com/adithya1605p/disease_detection/tree/master/models"
click node_trainer "https://github.com/adithya1605p/disease_detection/blob/master/train_all.py"
click node_disease_config "https://github.com/adithya1605p/disease_detection/blob/master/config.py"
click node_datasets "https://github.com/adithya1605p/disease_detection/tree/master/data"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_streamlit_app,node_disease_select,node_overview,node_model_details,node_user toneBlue
class node_feature_form,node_example_profiles,node_screening,node_risk_checks,node_results,node_report,node_artifacts,node_metrics toneAmber
class node_trainer,node_disease_config,node_datasets toneMint
```

## Components

### Screening dashboard

- [Streamlit dashboard](https://github.com/adithya1605p/disease_detection/blob/master/app.py): `app.py`
- [Disease selector](https://github.com/adithya1605p/disease_detection/blob/master/app.py): `app.py`
- [Disease overview](https://github.com/adithya1605p/disease_detection/blob/master/app.py): `app.py`
- [Model details](https://github.com/adithya1605p/disease_detection/blob/master/app.py): `app.py`

### Screening experience

- [Clinical input form](https://github.com/adithya1605p/disease_detection/blob/master/app.py): `app.py`
- [Example profiles](https://github.com/adithya1605p/disease_detection/blob/master/app.py): `app.py`
- [Screening estimate](https://github.com/adithya1605p/disease_detection/blob/master/app.py): `app.py`
- [Biomarker checks](https://github.com/adithya1605p/disease_detection/blob/master/app.py): `app.py`
- [Result and confidence](https://github.com/adithya1605p/disease_detection/blob/master/app.py): `app.py`
- [CSV report](https://github.com/adithya1605p/disease_detection/blob/master/app.py): `app.py`
- [Saved model artifacts](https://github.com/adithya1605p/disease_detection/tree/master/models): `models`
- [Evaluation metrics](https://github.com/adithya1605p/disease_detection/tree/master/models): `models`

### Model training

- [Training pipeline](https://github.com/adithya1605p/disease_detection/blob/master/train_all.py): `train_all.py`
- [Disease configuration](https://github.com/adithya1605p/disease_detection/blob/master/config.py): `config.py`
- [Disease datasets](https://github.com/adithya1605p/disease_detection/tree/master/data): `data`

### Other components

- **Dashboard user**

## Connections

- Dashboard user → Streamlit dashboard: uses (evidence: `README.md`)
- Streamlit dashboard → Disease selector: offers (evidence: `README.md`)
- Disease selector → Disease overview: selects disease (evidence: `README.md`)
- Disease selector → Clinical input form: selects disease (evidence: `README.md`)
- Disease overview → Evaluation metrics: shows metrics (evidence: `README.md`)
- Clinical input form → Saved model artifacts: uses feature list (evidence: `README.md`)
- Example profiles → Clinical input form: populates inputs (evidence: `README.md`)
- Clinical input form → Screening estimate: submits inputs (evidence: `README.md`)
- Screening estimate → Saved model artifacts: uses model (evidence: `README.md`)
- Screening estimate → Biomarker checks: checks ranges (evidence: `app.py`)
- Screening estimate → Result and confidence: returns estimate (evidence: `README.md`)
- Result and confidence → CSV report: downloads report (evidence: `README.md`)
- Model details → Saved model artifacts: explains inputs (evidence: `README.md`)
- Training pipeline → Disease configuration: loads configuration (evidence: `README.md`)
- Training pipeline → Disease datasets: loads datasets (evidence: `README.md`)
- Training pipeline → Saved model artifacts: saves models (evidence: `README.md`)
