File size: 12,480 Bytes
00c8931
 
 
 
 
 
 
 
 
 
 
 
 
698a414
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
---
title: Early-prediction-for-ml Proj
emoji: πŸ“‰
colorFrom: blue
colorTo: green
sdk: streamlit
sdk_version: 1.44.0
app_file: app.py
pinned: false
short_description: This tool provides early prediction and analysis for various
---

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference


---

<!-- # 🩺 AI-Powered Health & Lifestyle Disease Prediction

Welcome to the **AI-Powered Health Prediction System**! πŸš€

This tool provides **early prediction and analysis** for various health conditions using **Machine Learning & NLP**. It is designed to assist users in understanding potential health risks based on their lifestyle and symptoms.

---

## πŸ₯ Available Features:

βœ… **Lifestyle Disease Predictor** (Checkbox-based system using BiomedNLP-PubMedBERT)

πŸ€– **AI Chatbot for Health Assistance** (Ask health-related questions)

🧠 **Mental Health Assessment** (Analyze sentiment & well-being)

🩸 **Disease Predictors:**
   - Diabetes
   - Asthma
   - Stroke
   - Cardiovascular Disease

πŸ“Š **Data Visualizer** (Analyze trends in health conditions)

πŸ›  **User-friendly Interface** (Easy navigation and interactive elements)

πŸ”” **Personalized Health Insights** (Recommendations based on user input)

πŸ‘‰ **Select an option from the sidebar to proceed!**

---

## πŸš€ Quick Start Guide

1. Clone this repository:
   ```bash
   git clone https://github.com/MOHITRAJDEO12345/early-prediction-for-ml_proj.git
   ```
2. Navigate to the project directory:
   ```bash
   cd early-prediction-for-ml_proj
   ```
3. Install dependencies:
   ```bash
   pip install -r requirements.txt
   ```
4. Run the application:
   ```bash
   streamlit run app.py
   ```

---

## πŸ–₯ Application Sections

The application includes the following navigation options:

```python
options = [
    'Home',
    'Checkbox-to-disease-predictor',
    'AI Health Consultant',
    'Mental-Analysis',
    'Diabetes Prediction',
    'Asthma Prediction',
    'Cardiovascular Disease Prediction',
    'Stroke Prediction',
    'Sleep Health Analysis',
    'Data Visualization',
    'Text-based Disease Prediction'
]
```

### 🧠 Mental Health Analysis
- NOTE: the trained model was not upto mark so we switched to gated transformer model
- Uses **mental/mental-roberta-base** for sentiment-based mental health assessment.
- Predicts **Depression and Anxiety** based on user input.
- Provides graphical risk assessment using **Seaborn & Matplotlib**.

### πŸ”¬ Disease Prediction Models
- NOTE: only those diseases have been taken that can be predicted wihtout diagnostic results and some of the features have been discared for training
- **Diabetes Model**: Predicts diabetes risk using medical indicators.
- **Asthma Model**: Uses preprocessed datasets to detect asthma likelihood.
- **Cardiovascular Model**: XGBoost-based prediction for heart disease.
- **Stroke Model**: Uses ML models to assess stroke risk factors.

### πŸ“ Text-based Disease Prediction
- Uses **distilbert-base-uncased** for text-based disease prediction.
- Allows users to input symptoms via text or audio.
- Predicts possible lifestyle diseases based on user input.
- Provides graphical risk assessment using **Seaborn & Matplotlib**.

---

## πŸ“Έ Screenshots & UI Preview

πŸ” **Streamlit Application Interface:**

- NOTE: for functionality purpose only
- YOUTUBE: https://youtu.be/abrRqceVuDU
![Streamlit UI](screenshots/streamlit.png)

πŸ“Š **Data Visualization Example:**
- NOTE: currently showing datasets 
it will be used for visualizing anomalies in user predictions it will become personalized
![Data Visualization](screenshots/data_visual.png)
![User Graph](screenshots/user_graph.png)

πŸ–₯ **Separate Frontend Interface:**
- NOTE: the frontend is currently not connected with ml models and it may behave wrongly
- WORKING: https://v0.dev/chat/community/lifestyle-disease-prediction-ADp1mOc0hKg
- YOUTUBE: https://youtu.be/DU4FW-8hSoU
![Frontend UI](screenshots/frontend.png)

---

## ⚠️ Disclaimer

This application has been developed using real-world healthcare datasets sourced from Kaggle:

- **Stroke Prediction Dataset**
- **Asthma Analysis & Prediction Dataset**
- **Diabetes Dataset**
- **Cardiovascular Disease Dataset**
- **Sentiment Analysis for Mental Health**

The predictions are generated using machine learning models trained on these datasets, incorporating evaluation metrics and graphical insights to enhance interpretability.

However, this tool has **not undergone clinical validation** and should be used for **informational and educational purposes only**. It is not intended to serve as a substitute for **professional medical diagnosis or treatment**. Always consult a qualified healthcare provider for medical advice.

---

# colab
- https://colab.research.google.com/drive/1DpOH7KgTWubr5qQjj13EDqxIqsbPLDQe?usp=sharing#scrollTo=EgbDF0U5L1l2
- https://colab.research.google.com/drive/1GI7Z1GPPUi67X6UssCQVJXr_QoysfJrz#scrollTo=XkcDpRRzFCIX
- https://colab.research.google.com/drive/1eZIBboyY_x0ZsJp5G10XrFFu4aG4eCuf#scrollTo=3NDJOlrEpmoL
- http://colab.research.google.com/drive/11KO6cvyTeYY_v5PnYqTwheEupJtNjfCr?usp=sharing#scrollTo=7EyXbXJkPnqf
- https://colab.research.google.com/drive/1-B7Q8hXHD0iIBvVldnLkvCiWGhJ2iYNL?usp=sharing
- https://colab.research.google.com/drive/1inXO2_JvTw6fOXiJGaW_0pJvI_3sNo0T?usp=sharing
- https://colab.research.google.com/drive/1NpwO0NBOKQBtUuN9cC-CXE4vuP5TCavY?usp=sharing
- https://colab.research.google.com/drive/10W68SdZHS3IvJAjFTBoqEFI5g7USZVo9?usp=sharing
- https://colab.research.google.com/drive/1J8xvEs7rDn0NLYIzH5S2UgFt-lOk7TA6?usp=sharing
- https://colab.research.google.com/drive/1BeDmCVjVLb3uqUHdnafgLMLItAtgsAsN?usp=sharing
- 
---

## πŸ“Œ Modular Features (Pending Integration)

Several functionalities have been implemented but are pending Streamlit integration for optimization:

βœ… **User Login & Basic Inputs**: Secure authentication and user profile management.
βœ… **Personalized Email Reports**: Automated daily, weekly, and monthly health insights.
βœ… **Anomaly Visualization**: Analyzes past predictions to detect anomalies.
βœ… **Workout Plans**: AI-driven personalized workout routines based on health data.
βœ… **Sleep Analysis**: AI-powered sleep tracking and recommendations.
βœ… **Medication Adherence**: Reminders and tracking for prescribed medications.
βœ… **Nutrition Recommendations**: AI-based meal planning and dietary suggestions.
βœ… **Community & Resources**: A section for health articles, discussions, and expert Q&A.

---

## πŸ”¬ Ongoing Research & Future Enhancements

🚧 **Fitbit API Integration** – Real-time health monitoring with wearable devices.
🚧 **LSTM Models for Realtime Fitbit Data** – Developing deep learning models for dynamic health tracking.
🚧 **Enhanced Mental Health Analysis** – Exploring transformer-based sentiment models for deeper insights.
🚧 **Hybrid ML & NLP Systems** – Combining structured health data with unstructured text for more accurate predictions.

---

## πŸ‘¨β€πŸ’» Author

Developed by **Mohit Rajdeo**  
GitHub: [MOHITRAJDEO12345](https://github.com/MOHITRAJDEO12345)

---

## 🀝 Contributions

Contributions are always welcome! Feel free to open an issue or submit a pull request if you have suggestions or improvements.

---

## πŸ“¬ Contact

For any questions or feedback, feel free to reach out:

πŸ“§ Email: [email protected]  
🐦 Twitter: [@mohitrajdeo](https://twitter.com/mohitrajdeo) -->



# 🩺 Early Prediction of Health & Lifestyle Diseases

Welcome to the **AI-Powered Health Prediction System**! πŸš€

This tool provides **early prediction and analysis** for various health conditions using **Machine Learning & NLP**. It assists users in understanding potential health risks based on their lifestyle, medical indicators, and symptoms.

---

## πŸ₯ Available Features:

βœ… **Diabetes Prediction** – Predict diabetes risk using medical indicators.

βœ… **Hypertension Prediction** – Assess the risk of high blood pressure.

βœ… **Cardiovascular Disease Prediction** – XGBoost-based prediction for heart disease.

βœ… **Stroke Prediction** – Machine Learning-based stroke risk analysis.

βœ… **Asthma Prediction** – Detect asthma likelihood using preprocessed datasets.

βœ… **Sleep Health Analysis** – AI-driven analysis of sleep patterns and health.

βœ… **Mental Health Assessment** – Sentiment-based analysis using **mental-roberta-base**.

βœ… **Medical Consultant AI Chatbot** – Ask health-related questions for AI-driven insights.

βœ… **Data Visualization** – Graphical representation of health trends and anomalies.

πŸ‘‰ **Select an option from the sidebar to proceed!**

---

## πŸš€ Quick Start Guide

1. Clone this repository:
   ```bash
   git clone https://github.com/MOHITRAJDEO12345/early-prediction-for-ml_proj.git
   ```
2. Navigate to the project directory:
   ```bash
   cd early-prediction-for-ml_proj
   ```
3. Install dependencies:
   ```bash
   pip install -r requirements.txt
   ```
4. Run the application:
   ```bash
   streamlit run app.py
   ```

---

## πŸ–₯ Application Sections

The application includes the following navigation options:

```python
options = [
    'Home',
    'Diabetes Prediction',
    'Hypertension Prediction',
    'Cardiovascular Disease Prediction',
    'Stroke Prediction',
    'Asthma Prediction',
    'Sleep Health Analysis',
    'Mental-Analysis',
    'Medical Consultant',
    'Data Visualization'
]
```

### 🧠 Mental Health Analysis
- Uses **mental/mental-roberta-base** for sentiment-based mental health assessment.
- Predicts **Depression and Anxiety** based on user input.
- Provides graphical risk assessment using **Seaborn & Matplotlib**.

### πŸ”¬ Disease Prediction Models
- **Diabetes Model**: Predicts diabetes risk based on medical data.
- **Hypertension Model**: Evaluates high blood pressure risk.
- **Cardiovascular Model**: Uses XGBoost for heart disease prediction.
- **Stroke Model**: ML-based assessment of stroke risk factors.
- **Asthma Model**: Machine learning model for asthma detection.

### πŸ“Š Data Visualization
- Interactive graphs to analyze health trends.
- Anomaly detection for user predictions.

### πŸ€– AI Medical Consultant
- AI-powered chatbot for answering health-related queries.
- Uses NLP models for better understanding and recommendations.

---

## πŸ“Έ Screenshots & UI Preview

πŸ” **Streamlit Application Interface:**
![Streamlit UI](screenshots/streamlit.png)

πŸ“Š **Data Visualization Example:**
![Data Visualization](screenshots/data_visual.png)
![User Graph](screenshots/user_graph.png)

πŸ–₯ **Separate Frontend Interface:**
![Frontend UI](screenshots/frontend.png)

---

## ⚠️ Disclaimer

This application has been developed using real-world healthcare datasets sourced from Kaggle:

- **Diabetes Dataset**
- **Hypertension Dataset**
- **Cardiovascular Disease Dataset**
- **Stroke Prediction Dataset**
- **Asthma Analysis & Prediction Dataset**
- **Sentiment Analysis for Mental Health**

The predictions are generated using machine learning models trained on these datasets, incorporating evaluation metrics and graphical insights to enhance interpretability.

However, this tool has **not undergone clinical validation** and should be used for **informational and educational purposes only**. It is not intended to serve as a substitute for **professional medical diagnosis or treatment**. Always consult a qualified healthcare provider for medical advice.

---

# πŸ”¬ Ongoing Research & Future Enhancements

🚧 **Fitbit API Integration** – Real-time health monitoring with wearable devices.
🚧 **LSTM Models for Realtime Fitbit Data** – Developing deep learning models for dynamic health tracking.
🚧 **Enhanced Mental Health Analysis** – Exploring transformer-based sentiment models for deeper insights.
🚧 **Hybrid ML & NLP Systems** – Combining structured health data with unstructured text for more accurate predictions.

---

## πŸ‘¨β€πŸ’» Author

Developed by **Mohit Rajdeo**  
GitHub: [MOHITRAJDEO12345](https://github.com/MOHITRAJDEO12345)

---

## 🀝 Contributions

Contributions are always welcome! Feel free to open an issue or submit a pull request if you have suggestions or improvements.

---

## πŸ“¬ Contact

For any questions or feedback, feel free to reach out:

πŸ“§ Email: [email protected]  
🐦 Twitter: [@mohitrajdeo](https://twitter.com/mohitrajdeo)