|
a |
|
b/README.md |
|
|
1 |
# Preventive Healthcare System |
|
|
2 |
|
|
|
3 |
This project is an **AI-powered Predictive Healthcare System** that helps identify individuals at risk of developing chronic diseases such as **diabetes, heart disease, or obesity**. The system provides personalized recommendations for preventive care based on lifestyle and medical data. |
|
|
4 |
|
|
|
5 |
## Features |
|
|
6 |
- AI-based health risk prediction for **diabetes**, **heart disease**, and **obesity**. |
|
|
7 |
- User-friendly form for inputting health and lifestyle data. |
|
|
8 |
- Displays risk probabilities and provides feedback on how to manage risks. |
|
|
9 |
- Uses pre-trained machine learning models to assess the risk levels. |
|
|
10 |
- Integrated with **Streamlit** for interactive web-based applications. |
|
|
11 |
|
|
|
12 |
## Prerequisites |
|
|
13 |
|
|
|
14 |
Ensure you have the following installed: |
|
|
15 |
- Python 3.7+ |
|
|
16 |
- `streamlit` |
|
|
17 |
- `pandas` |
|
|
18 |
- `scikit-learn` |
|
|
19 |
- `requests` |
|
|
20 |
- `Pillow` (for image processing) |
|
|
21 |
|
|
|
22 |
Install all the necessary dependencies using the following command: |
|
|
23 |
|
|
|
24 |
```bash |
|
|
25 |
pip install -r requirements.txt |
|
|
26 |
``` |
|
|
27 |
|
|
|
28 |
## Installation & Setup |
|
|
29 |
|
|
|
30 |
1. **Clone the repository**: |
|
|
31 |
|
|
|
32 |
```bash |
|
|
33 |
git clone https://github.com/aaarif796/AI-Powered-Preventive-Healthcare-System.git |
|
|
34 |
cd AI-Powered-Preventive-Healthcare-System |
|
|
35 |
``` |
|
|
36 |
|
|
|
37 |
2. **Download or Place Model Files**: |
|
|
38 |
|
|
|
39 |
Make sure to have the pre-trained model files: |
|
|
40 |
- `label_encoders.pkl` |
|
|
41 |
- `lr_dt.pkl` (Logistic Regression model for Diabetes) |
|
|
42 |
- `lr_ht.pkl` (Logistic Regression model for Heart Disease) |
|
|
43 |
- `lr_ob.pkl` (Logistic Regression model for Obesity) |
|
|
44 |
|
|
|
45 |
Place these files inside the `model` folder. |
|
|
46 |
|
|
|
47 |
3. **Add Images**: |
|
|
48 |
|
|
|
49 |
Place relevant images in the `images` folder for visual representation. |
|
|
50 |
|
|
|
51 |
4. **CSS Styling**: |
|
|
52 |
|
|
|
53 |
The application uses a custom CSS file for styling. Ensure you have the `style.css` file in the `style` folder. |
|
|
54 |
|
|
|
55 |
## Usage |
|
|
56 |
|
|
|
57 |
1. **Run the Application**: |
|
|
58 |
|
|
|
59 |
Use Streamlit to launch the app with the following command: |
|
|
60 |
|
|
|
61 |
```bash |
|
|
62 |
streamlit run app.py |
|
|
63 |
``` |
|
|
64 |
|
|
|
65 |
2. **Input Data**: |
|
|
66 |
|
|
|
67 |
Fill out the form with your general health and lifestyle details (e.g., age, exercise habits, smoking history, etc.). |
|
|
68 |
|
|
|
69 |
3. **Receive Feedback**: |
|
|
70 |
|
|
|
71 |
The app will predict your risk level for **diabetes**, **heart disease**, and **obesity** based on the data you provide. It will also offer personalized advice based on the risk level. |
|
|
72 |
|
|
|
73 |
## Folder Structure |
|
|
74 |
|
|
|
75 |
``` |
|
|
76 |
├── images |
|
|
77 |
│ ├── healthcare.webp |
|
|
78 |
├── model |
|
|
79 |
│ ├── label_encoders.pkl |
|
|
80 |
│ ├── lr_dt.pkl |
|
|
81 |
│ ├── lr_ht.pkl |
|
|
82 |
│ ├── lr_ob.pkl |
|
|
83 |
├── style |
|
|
84 |
│ ├── style.css |
|
|
85 |
├── app.py |
|
|
86 |
├── README.md |
|
|
87 |
├── requirements.txt |
|
|
88 |
``` |
|
|
89 |
|
|
|
90 |
## Model Details |
|
|
91 |
|
|
|
92 |
- **label_encoders.pkl**: Used to encode categorical data. |
|
|
93 |
- **lr_dt.pkl**: Logistic Regression model for predicting the risk of diabetes. |
|
|
94 |
- **lr_ht.pkl**: Logistic Regression model for predicting heart disease risk. |
|
|
95 |
- **lr_ob.pkl**: Logistic Regression model for obesity risk. |
|
|
96 |
|
|
|
97 |
## Acknowledgments |
|
|
98 |
|
|
|
99 |
This application was developed as part of the **TechXcelerate 2024** challenge, focusing on developing a predictive healthcare system using machine learning and AI. |
|
|
100 |
|