File size: 2,761 Bytes
5970059
 
 
 
 
19677e1
 
 
38eae38
19677e1
38eae38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: mit
sdk: gradio
---

---
license: mit
---
# 🧠 Disease Symptom Prediction AI

![Python](https://img.shields.io/badge/python-3.10+-blue.svg)
![License](https://img.shields.io/github/license/matesoft2033/disease-symptom-predictor-ai)
![Issues](https://img.shields.io/github/issues/matesoft2033/disease-symptom-predictor-ai)

AI-powered tool that predicts possible diseases based on symptoms using a trained machine learning model and provides chatbot-style suggestions.

---

## πŸ“ Project Structure

```
disease-symptom-prediction/
β”œβ”€β”€ data/               # Excel dataset (not uploaded)
β”‚   └── README.md       # Instructions for downloading from Kaggle
β”‚
β”œβ”€β”€ src/                # Source code
β”‚   β”œβ”€β”€ data_preprocessing.py   # Cleans & prepares dataset
β”‚   β”œβ”€β”€ model.py                # Trains and saves the ML model
β”‚   β”œβ”€β”€ predict.py              # Predicts disease from symptoms
β”‚   └── chatbot.py              # Symptom-checker chatbot logic
β”‚
β”œβ”€β”€ app/                # App interface
β”‚   └── gradio_app.py   # Gradio-based web UI
β”‚
β”œβ”€β”€ models/             # Trained model files
β”‚   └── rf_model.pkl
β”‚
β”œβ”€β”€ notebooks/          # Jupyter notebooks for analysis
β”‚   β”œβ”€β”€ 1_data_exploration.ipynb
β”‚   β”œβ”€β”€ 2_preprocessing_test.ipynb
β”‚   └── 3_model_testing.ipynb
β”‚
β”œβ”€β”€ requirements.txt    # Python dependencies
β”œβ”€β”€ .gitignore
└── README.md
```

---

## βš™οΈ Installation

### 1. Clone the repository

```bash
git clone https://github.com/your-username/disease-symptom-prediction.git
cd disease-symptom-prediction
```

### 2. Create virtual environment (optional but recommended)

```bash
python -m venv venv
source venv/bin/activate   # On Windows: venv\Scripts\activate
```

### 3. Install dependencies

```bash
pip install -r requirements.txt
```

---

## πŸš€ Run the App

```bash
python app/gradio_app.py
```

The app will start locally and you can open it in your browser at `http://localhost:7860`.

---

## πŸ€– Features

- βœ… Predict disease from symptoms
- 🧠 Trained on structured healthcare dataset
- πŸ’¬ Chatbot-style health advice
- πŸ–₯️ User-friendly Gradio interface

---

<details>
<summary>πŸ“¦ Dataset Note (Click to expand)</summary>

We use a healthcare dataset available on [Kaggle](https://www.kaggle.com/). Due to licensing, it is not uploaded in this repo. Please download it manually and place it in the `data/` directory.

</details>

---

## πŸͺͺ License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

---

## πŸ™ Credits

Created by [Mate](https://github.com/your-username) β€” feel free to fork, star, or contribute.

---