How move7/lifeai-multiple-disease-prediction-ml-ai-software works
1. Repository shape
- This is a monorepo of multiple disease-prediction projects, not a single cleanly layered product.
- The top level contains the main LifeAI Django app plus many standalone research/training notebooks and sub-apps for specific diseases.
2. Main product boundary
- The root Django project appears to be the primary runtime: manage.py, core/, predictor/, templates/, static/, db.sqlite3, requirements.txt, runtime.txt, and tools/.
- That root app is the umbrella UI for the multi-disease predictor described in the README.
3. Root request flow
- The serving path is typical Django: browser request → URL routing in core/urls.py and predictor/urls.py → view functions in predictor/views.py → form handling in predictor/forms.py → prediction result rendered through Django templates.
- The output is a disease-specific prediction page rather than an API-first service.
4. Model-serving assets
- Trained artifacts are stored on disk, not in a database: tools/model_joblib, tools/scaler_joblib, and model_pkl.
- The presence of scaler artifacts means some models require the input to be normalized before inference.
- Static CSVs under static/ such as Breast_train.csv, Diabetes_XTrain.csv, Diabetes_YTrain.csv, and Heart_train.csv suggest training/support data is bundled with the repo as reference material or for local experimentation.
5. UI layer
- Presentation is handled by Django templates in templates/, including disease-specific pages like breast.html, diabetes.html, heart.html, lhome.html, alhome.html, and shared layout fragments like base.html and navbar.html.
- Static assets in static/css and static/js provide the client-side styling and interaction for the prediction forms.
6. Root persistence
- db.sqlite3 at the root indicates a lightweight Django persistence layer, likely for app state or admin scaffolding rather than prediction storage.
- media/ suggests uploaded files or generated outputs are persisted separately from trained models.
7. Training / experimentation boundary
- Most of the .ipynb files are offline model-development artifacts, not runtime components.
- They cover breast cancer, heart disease, diabetes, lung cancer, Parkinson’s, and Alzheimer’s experiments using ML, deep learning, and bio-inspired optimization.
- In architecture terms, these notebooks feed the serialized model files consumed by the Django serving layer.
8. Alzheimer’s subsystem
- alz/ is a Django app with forms.py, views.py, urls.py, and media/, indicating a separate upload-driven or form-driven workflow.
- The alzheimers/ directory contains the training pipelines and preprocessing scripts, including CNN-based work and data augmentation/preprocessing notebooks.
- This looks like a distinct subdomain with image/deep-learning processing rather than tabular prediction.
9. Parkinson’s subsystem
- Parkinsons/parkinsons-predictor-django/.../web-app is a self-contained Django application with its own manage.py, settings.py, urls.py, templates, static files, SQLite DB, and deployed model/scaler artifacts.
- This is effectively a separate deployable service inside the repo, likely built for voice-feature-based Parkinson’s prediction.
10. Kidney and other standalone apps
- kidney/Chronic-Kidney-Disease-Prediction-main is another standalone web app, with app.py, templates/, static/, and a saved model models/kidney.pkl.
- heart/, diabetes/, breastcancer/, and lungcancer/ mainly hold experimentation code and datasets rather than the root runtime.
11. Deployment and runtime concerns
- Procfile files and runtime.txt show the repo is intended for Python web deployment on a platform like Heroku or similar PaaS.
- The architecture is therefore split between:
- offline training notebooks/scripts
- serialized model artifacts
- Django/Flask-style serving apps
- static/template-based UI
12. How to diagram it
- The most accurate diagram is a hub-and-spoke model:
- a central LifeAI Django shell,
- disease-specific prediction flows,
- on-disk model/scaler artifacts,
- separate training notebooks feeding those artifacts,
- and a few fully independent sub-apps reused from prior projects.
- Avoid drawing this as one unified microservice system; it is closer to a repository of integrated demos and deployable slices than a single production platform.
Main entry points: tools Model artifacts · views.py Predictor views · alz Alz app · manage.py manage.py
Components 18
LifeAI Django app
Primary multi-disease runtime and shared UI layer at the repository root.
- manage.py · Root Django command entry used to run the main LifeAI app.
manage.py - Core URLs · Project-level URL configuration for the root Django site.
core/urls.py - Predictor views · Main view layer that handles prediction form submission and result rendering.
predictor/views.py - Predictor forms · Django forms used to validate disease prediction inputs.
predictor/forms.py - Root templates · Shared and disease-specific Django templates for the main LifeAI UI.
templates - Root static · Static CSS, JS, and bundled training/reference CSVs for the main app.
static - Model artifacts · On-disk joblib/pickle artifacts used by the serving layer for inference.
tools - SQLite DB · Lightweight Django database for app state and admin scaffolding.
db.sqlite3 - Media · Persistent storage for uploaded files or generated outputs.
media
Standalone sub-apps
Self-contained prediction apps embedded in the monorepo.
- Alz app · Separate Alzheimer’s workflow with its own forms, views, and URLs.
alz - Alz training · Alzheimer’s preprocessing, augmentation, and CNN-oriented experimentation.
alzheimers - Parkinsons web · Self-contained deployable Django application for Parkinson’s prediction.
Parkinsons/parkinsons-predictor-django/parkinsons-predictor-main/web-app - Parkinsons artifacts · Trained model and scaler artifacts used by the Parkinsons web app.
Parkinsons/parkinsons-predictor-django/parkinsons-predictor-main/web-app/tools - Kidney app · Standalone chronic kidney disease prediction app with templates and a pickled model.
kidney/Chronic-Kidney-Disease-Prediction-main
Research and training
Offline notebooks, datasets, and preprocessing used to develop models and artifacts.
- Heart research · Heart disease experimentation with ANN, genetic algorithms, and ensemble optimization.
heart - Diabetes research · Diabetes model-development notebooks and dataset material.
diabetes - Breast research · Breast cancer experimentation notebooks and bundled datasets.
breastcancer - Lung research · Lung cancer experimentation and whale-optimization work.
lungcancer
Connections 18
- manage.py → Core URLs: bootstraps · The Django entrypoint loads the project URL configuration.
- Core URLs → Predictor views: routes to · Requests are dispatched from project URLs into the predictor app views.
- Predictor views → Predictor forms: validates with · Views use Django forms to validate disease-specific inputs.
- Predictor views → Root templates: renders · Prediction outcomes are shown through shared and disease-specific templates.
- Predictor views → Model artifacts: loads artifacts · Inference code reads serialized model assets from disk.
- Predictor views → Root static: uses assets · The UI consumes static CSS, JS, and bundled reference data.
- Model artifacts → Root static: trained from · Bundled CSVs in static support local experimentation and model fitting.
- SQLite DB → manage.py: persists for · SQLite supports the root Django runtime and admin state.
- Media → Predictor views: stores outputs · Uploaded files or generated outputs are persisted separately from models.
- Alz app → Root templates: shares UI · The Alzheimer’s app fits into the broader Django template-driven interface.
- Alz app → Media: uploads · The Alzheimer’s workflow uses media storage for uploaded files.
- Alz training → Alz app: feeds · Offline Alzheimer’s preprocessing and training inform the runtime subapp.
- Parkinsons web → Parkinsons artifacts: loads · The Parkinsons Django app serves predictions from local serialized artifacts.
- Heart research → Model artifacts: informs · Heart disease notebooks contribute model logic and artifacts to the main app.
- Diabetes research → Model artifacts: informs · Diabetes experimentation informs the serialized model assets used by the root app.
- Breast research → Model artifacts: informs · Breast cancer experimentation informs the root inference artifacts and pages.
- Lung research → Model artifacts: informs · Lung cancer experimentation feeds the broader model-development pipeline.
- Kidney app → Model artifacts: parallel model app · A separate kidney prediction app uses its own local pickled model and templates.