How ishansharma1811/healthcare-prediction-system works
This is a Flask diabetes-risk prediction application with a separate model-training workflow. Patients submit clinical measurements through the web interface; the Flask endpoint scales inputs, predicts risk, and returns a score and recommendations for display. Training reads the diabetes dataset, preprocesses and tunes a Random Forest, evaluates it, and saves model artifacts used by the application. The main runtime and training files were excerpted; other interface and artifact relationships follow README documentation or explicit references in those excerpts.
Main entry points: app.py Flask routes · train_model.py Preprocessing · index.html Prediction form · main.js Form and results
Components 13
Model training
- Preprocessing
train_model.py - Model tuning
train_model.py - Model evaluation
train_model.py
Prediction service
- Flask routes
app.py - Risk prediction
app.py - Health recommendations
app.py
User interface
- Prediction form
templates/index.html - Form and results
static/js/main.js
Data and artifacts
- Diabetes dataset
data/diabetes.csv - Classifier
model/healthcare_model.pkl - Feature scaler
model/scaler.pkl
Other components
- Patient
- API client
Connections 15
- Diabetes dataset → Preprocessing: loads data
train_model.py - Preprocessing → Model tuning: prepares features
train_model.py - Model tuning → Model evaluation: evaluates model
train_model.py - Model tuning → Classifier: saves classifier
train_model.py - Preprocessing → Feature scaler: saves scaler
train_model.py - Patient → Prediction form: enters measurements
README.md - Prediction form → Form and results: uses scripts
- Form and results → Flask routes: posts prediction
static/js/main.js - API client → Flask routes: posts prediction
README.md - Flask routes → Prediction form: renders page
app.py - Flask routes → Risk prediction: processes inputs
app.py - Risk prediction → Feature scaler: loads scaler
app.py - Risk prediction → Classifier: loads model
app.py - Risk prediction → Health recommendations: generates guidance
app.py - Flask routes → Form and results: returns results
static/js/main.js