MULTIPLE DISEASE PREDICTOR
The provided Flask application is a web-based disease prediction system that allows users to input medical data and receive a prediction about the likelihood of having one of three diseases: Diabetes, Parkinson's disease, or Heart disease.The application utilizes pre-trained machine learning models, which are loaded using the Python pickle module, to perform the predictions.The models are assumed to have been trained beforehand using suitable datasets and saved as diabetes.pkl,parkinsons.pkl, and heart.pkl.The application begins by initializing a Flask web server and loading the three prediction models.The root route(/) renders the homepage(home.html),which typically includes links to other pages specific to each disease.These diseasespecific pages-/diabetes, /parkinsons/, and /heartdisease/-render respective HTML templates for collecting input features from the user via forms.For each disease, there is a corresponding POST route: /predictdiabetes/, /predictparkinson/, and /predictheartdisease/.These routes handle the form submissions, extract input data from the HTML form using request.form.values(),convert it into a NumPy array of type float, and pass it to the appropriate model's predict method.Based on the model's binary output (0 for no disease, 1 for presence of disease), the application constructs a message indicating whether or not the person is predicted to have the disease.This message is then passed back to the same disease-specific HTML template and displayed as part of the page.The architecture adheres to the MVC (Model-View-Controller) design pattern, where the machine learning models act as the backend logic (model), Flask routes serve as controllers, and the HTML templates represent the views.The system is modular and scalable, making it relatively straight forward to add support for additional diseases by training new models and creating corresponding views and controller routes.
Publication Details
- Journal
- International Research Journal of Modernization in Engineering Technology and Science
- Published
- 2025-08-04
- DOI
- https://doi.org/10.56726/irjmets81706
- Primary Topic
- Artificial Intelligence in Healthcare
- Type
- article
- Field-Weighted Citation Impact
- 0.00