How anand-nayak-git/stroke-prediction-system works
This Flask application serves a stroke-risk form, converts submitted demographic and health fields into model inputs, combines a trained-model prediction with threshold-based risk rules, and displays a result. Its other visible user-facing branches include a BMI calculator and counseling page. The README describes model training and evaluation, and the tree contains a dataset and training script; the sampled training code is commented out, so that branch is shown as inactive. The CTA route references a template absent from the tree. Evidence is limited to the README, tree, and sampled files.
Main entry points: app.py Flask routes · strokenew.pkl Trained model · predict.html Prediction form · bmi.html BMI page
Components 14
Web interface
- Home page
templates/index.html - Prediction form
templates/predict.html - Counseling page
templates/counsel.html
Stroke prediction
- Flask routes
app.py - Input mapping
app.py - Risk decision
app.py - Trained model
strokenew.pkl - Prediction result
templates/predict.html
Health tools
- BMI page
templates/bmi.html - BMI calculator
static/bmijs.js - Counsel route
app.py
Model development
- Stroke dataset
stroke prediction.csv - Training pipeline
traincode.py
Other components
- User
Connections 15
- User → Home page: opens
- User → Prediction form: enters health data
- Prediction form → Flask routes: submits form
- Flask routes → Input mapping: processes fields
- Input mapping → Trained model: predicts with
- Flask routes → Risk decision: applies thresholds
- Trained model → Risk decision: returns class
- Risk decision → Prediction result: selects message
- Flask routes → Prediction result: renders result
- User → BMI page: opens
- BMI page → BMI calculator: uses calculator
- User → Counseling page: opens
- Flask routes → Counsel route: serves page
- Stroke dataset → Training pipeline: loads data
- Training pipeline → Trained model: would serialize