HealthSphere is an AI-powered clinical decision support system that combines deep learning, risk stratification, and generative AI to offer 360° metabolic health insights. It forecasts glucose trends using LSTM with attention, classifies diabetes risk with XGBoost, and delivers personalized health recommendations — blending machine intelligence with medically aligned guidance. Designed for real-world generalization, it ensures zero data leakage through patient-level evaluation, and supports actionable, user-centric healthcare decisions.
📽️ Project Demo
-
📈 Glucose Forecasting: Predicts short-term glucose trends using LSTM with attention mechanism on time-series data (MAE: 0.020, R² Score: 0.983).
-
🧠 Diabetes Risk Classification: Uses XGBoost with hyperparameter tuning, threshold optimization, and class imbalance handling (F1-score: 0.69, Accuracy: 75.3%).
-
📋 Personalized Health Recommendations:
- Tailored lifestyle and diet advice based on BMI, glucose, and blood pressure.
- Preventive suggestions powered by Gemini API and fallback clinical heuristics.
-
🌐 Streamlit Web App: Interactive and user-friendly interface for uploading data, viewing predictions, and receiving recommendations.
-
🔗 GenAI Integration: Google Gemini API generates concise, actionable, and medically aligned suggestions in real-time.
- Machine Learning:
XGBoost,LSTM with Attention - Frameworks:
TensorFlow,Keras,Scikit-learn - Web Interface:
Streamlit - Data Engineering:
Pandas,NumPy,MinMaxScaler,Feature Engineering - GenAI Integration:
Google Gemini API
# 1. Clone the repository
https://github.com/its308/HealthSphere.git
# 2. Navigate to the project folder
cd HealthSphere
# 3. Create and activate a virtual environment
python -m venv venv
source venv/bin/activate # Windows: .\venv\Scripts\activate
# 4. Install required packages
pip install -r requirements.txt# Run the Streamlit app
streamlit run scripts/app.pyThen open http://localhost:8501 in your browser.
You can:
-
Enter current health parameters (BMI, Glucose, BP, etc.)
-
Provide recent glucose readings
-
Get:
- Risk Level (Normal, Warning, Critical)
- Predicted Glucose
- Actionable Recommendations
HealthSphere/
├── models/
│ ├── lstm_glucose_model.h5 # LSTM model for glucose prediction
│ └── xgboost_diabetes_model.pkl # XGBoost model for risk classification
├── scripts/
│ ├── app.py # Streamlit app logic
│ └── recommender.py # Core model logic + GenAI integration
├── data/
│ └── sample_data.csv # Sample user health data
├── requirements.txt # Dependency list
└── README.md # Project documentation
-
🧪 No Data Leakage: Glucose forecasting LSTM model was trained and tested on entirely disjoint patient sets — ensuring true generalization to unseen individuals.
-
📊 Evaluation on Unseen Patients: The model’s performance (R²: 0.983, MAE: 0.020) is validated on completely unseen patient data, not just random time splits — making the results trustworthy.
-
📁 Refer to the code in
prepare_time_series_data()where the split is done patient-wise and normalization is performed using only training data.
Glucose prediction graph below is from a test user not seen during training — confirming model generalization.
- 📱 Integration with wearables (e.g., Fitbit, Apple Health) for real-time glucose tracking.
- 📊 Visual dashboards for health progression and glucose trends.
- 🧠 Add mental health screening tools (e.g., PHQ-9, GAD-7).
- ☕️ Deploy to cloud platforms (e.g., AWS, GCP) with multi-user support.
Pull requests are welcome!
- Fork the repository
- Create a branch (
git checkout -b feature-name) - Commit changes (
git commit -m "Add feature") - Push to your fork (
git push origin feature-name) - Open a Pull Request 🚀
Licensed under the MIT License.
This project: https://github.com/its308/HealthSphere