# narendrareddy07/medical_diagnosis architecture

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

- Interactive diagram: https://gitdiagram.com/narendrareddy07/medical_diagnosis
- Repository: https://github.com/narendrareddy07/medical_diagnosis

## Overview

Medical_Diagnosis is a Streamlit app for entering patient measurements and returning predictions for diabetes, heart disease, Parkinson’s disease, lung cancer, and thyroid disease. The main workflow is user input in the disease-specific page, followed by a button-triggered prediction from the corresponding saved model and a displayed diagnosis. The excerpt shows model loading and prediction calls for heart and thyroid; the app’s full-file references identify the other model assets, but their call sites were not excerpted. The app refers to a `Models/` directory not present in the supplied tree, so the artifact paths below reflect the tree.

Main entry points: [`app.py`](https://github.com/narendrareddy07/medical_diagnosis/blob/main/app.py) (Streamlit diagnosis app), [`diabetes_model.sav`](https://github.com/narendrareddy07/medical_diagnosis/blob/main/diabetes_model.sav) (Diabetes model), [`Thyroid_model.sav`](https://github.com/narendrareddy07/medical_diagnosis/blob/main/Thyroid_model.sav) (Thyroid model), [`heart_disease_model.sav`](https://github.com/narendrareddy07/medical_diagnosis/blob/main/heart_disease_model.sav) (Heart disease model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_app["Streamlit diagnosis app<br/>[app.py]"]
end

subgraph group_metabolic["Metabolic models"]
  node_diabetes["Diabetes model<br/>[diabetes_model.sav]"]
  node_thyroid["Thyroid model<br/>[Thyroid_model.sav]"]
end

subgraph group_other["Other disease models"]
  node_heart["Heart disease model"]
  node_parkinsons["Parkinson’s model"]
  node_lungs["Lung disease model"]
end

node_user(("Patient / user"))

node_user -->|"enters measurements"| node_app
node_app -->|"loads and predicts"| node_diabetes
node_app -->|"loads and predicts"| node_thyroid
node_app -->|"loads and predicts"| node_heart
node_app -->|"loads and predicts"| node_parkinsons
node_app -->|"loads and predicts"| node_lungs

click node_app "https://github.com/narendrareddy07/medical_diagnosis/blob/main/app.py"
click node_diabetes "https://github.com/narendrareddy07/medical_diagnosis/blob/main/diabetes_model.sav"
click node_thyroid "https://github.com/narendrareddy07/medical_diagnosis/blob/main/Thyroid_model.sav"
click node_heart "https://github.com/narendrareddy07/medical_diagnosis/blob/main/heart_disease_model.sav"
click node_parkinsons "https://github.com/narendrareddy07/medical_diagnosis/blob/main/parkinsons_model.sav"
click node_lungs "https://github.com/narendrareddy07/medical_diagnosis/blob/main/lungs_disease_model.sav"

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_app,node_user toneBlue
class node_diabetes,node_thyroid toneAmber
class node_heart,node_parkinsons,node_lungs toneMint
```

## Components

### User interface

- [Streamlit diagnosis app](https://github.com/narendrareddy07/medical_diagnosis/blob/main/app.py): `app.py`

### Metabolic models

- [Diabetes model](https://github.com/narendrareddy07/medical_diagnosis/blob/main/diabetes_model.sav): `diabetes_model.sav`
- [Thyroid model](https://github.com/narendrareddy07/medical_diagnosis/blob/main/Thyroid_model.sav): `Thyroid_model.sav`

### Other disease models

- [Heart disease model](https://github.com/narendrareddy07/medical_diagnosis/blob/main/heart_disease_model.sav): `heart_disease_model.sav`
- [Parkinson’s model](https://github.com/narendrareddy07/medical_diagnosis/blob/main/parkinsons_model.sav): `parkinsons_model.sav`
- [Lung disease model](https://github.com/narendrareddy07/medical_diagnosis/blob/main/lungs_disease_model.sav): `lungs_disease_model.sav`

### Other components

- **Patient / user**

## Connections

- Patient / user → Streamlit diagnosis app: enters measurements (evidence: `app.py`)
- Streamlit diagnosis app → Diabetes model: loads and predicts (evidence: `app.py`)
- Streamlit diagnosis app → Thyroid model: loads and predicts (evidence: `app.py`)
- Streamlit diagnosis app → Heart disease model: loads and predicts (evidence: `app.py`)
- Streamlit diagnosis app → Parkinson’s model: loads and predicts (evidence: `app.py`)
- Streamlit diagnosis app → Lung disease model: loads and predicts (evidence: `app.py`)
