Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 1s (2025) 150 https://internationalpubls.com Leveraging Flask API and Machine Learning to Forecast Multiple Diseases K Venkateswara Rao1,D Srilatha2,Sridevi Sakhamuri3,Venkata Subbaiah Desanamukula4,M Asha Priyadarshini5,P Ramya6 1Professor, Department of CSE, Vignan’s Lara Institute of Technology & Science, Vadlamudi, Guntur(dt), AP,India, venkat545@gmail.com 2Professor, Department of EEE, Vasi Reddy Venkatadri Institute of Technology, Namburu-522508, Guntur(dt),AP,India. srilatha.dande@gmail.com 3Assistant Professor, Department of IoT, Koneru Lakshmaiah Education Foundation, Vaddeswaram, AP, India, 522302. srisat1617@gmail.com 4Professor, Department of Computer science and Engineering, Lakireddy Bali Reddy College of Engineering, Mylavaram, NTR Dist Andhra Pradesh, INDIA. desanamukula@gmail.com 5Assistant Professor, Department of CSE, Vignan’s Lara Institute of Technology & Science, Vadlamudi, India. ashapriyadarshini16@gmail.com 6 Assistant Professor,Department of CSE,Vignan’s Lara Institute of Technology & Science, Vadlamudi, India. ramya458@gmail.com Article History: Received: 09-08-2024 Revised: 25-09-2024 Accepted: 12-10-2024 Abstract: The study described in this abstract used machine learning to predict several diseases, and it integrated the model into a Flask API. A user-friendly platform for disease prediction based on patient symptoms and medical history was the goal of the paper. A number of strategies were used to optimize the predictive performance once the machine learning model had been trained on a sizable dataset of patient records. The model was made accessible as a web service through the usage of the Flask API, enabling simple deployment and integration into current healthcare systems. The study's findings demonstrated that the model could accurately forecast diseases with a high degree of precision, and the Flask API gave healthcare professionals an easy way to use the model in real-world settings. The study underscores the significance of developing open and user-friendly platforms for healthcare applications and shows the potential of machine learning and online APIs in improving disease detection. Additionally, the study discovered that the model could correctly identify disorders even in the absence of conclusive diagnostic tests. Keywords: Flask, ExtraTrees classifier, Grid Search CV. I. INTRODUCTION With the development of technology and machine learning, the field of medical science has experienced enormous progress in recent years. The foretelling of diseases is one such application of machine learning. Machine learning algorithms can evaluate trends and estimate the likelihood that a person would contract a specific disease with the aid of massive datasets. In identifying and treating different disorders, this can be very helpful to medical experts. As fast and precise diagnosis is essential for successful treatment and positive patient outcomes, disease prediction is a vital responsibility in healthcare. Recent developments in machine learning have made it possible to mailto:venkat545@gmail.com mailto:ashapriyadarshini16@gmail.com mailto:ramya458@gmail.com Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 1s (2025) 151 https://internationalpubls.com create predictive models that can correctly identify diseases based on the symptoms of the patient and their medical background. The absence of user-friendly interfaces and technical obstacles have prevented these models from being fully implemented in real-world healthcare settings, despite their potential. Through the creation of a machine learning model for disease prediction and its integration into a Flask API, this work tries to address these issues. In order to make machine learning models easily accessible to healthcare practitioners, Flask is a lightweight web framework for Python that enables their deployment as web services. It is simpler for healthcare providers to apply the model in practice since it has been integrated into a Flask API, which enables convenient and user-friendly access to the model. This study's goals are to show that machine learning and Flask APIs may be used to improve disease detection and to underline how crucial it is to design accessible and user- friendly platforms for healthcare apps. To train the machine learning model, the study will use a sizable dataset of patient records, and it will assess the model's performance in terms of accuracy and speed. The study's findings will shed light on the potential of machine learning and Flask APIs in the healthcare sector and guide future work on creating systems similar to this one for disease prediction. Machine learning can be used to diagnose four important diseases, including pneumonia, malaria, liver disease, and kidney disease. The algorithms may be taught to spot patterns and symptoms related to each disease by using large datasets of patient information and medical images for machine learning training datasets of patient information and medical images for machine learning training. In impoverished nations with limited access to healthcare specialists, this can significantly increase the efficacy and accuracy of diagnostics. For instance, machine learning models can use information about kidney function, such as creatinine levels and many other parameters, to forecast the risk that a patient would acquire kidney disease. In a similar way, chest X-rays can be used to identify pneumonia, and liver function tests can be studied to identify liver illness. Machine learning algorithms can examine microscope images in the instance of malaria to determine whether the parasite is present. In conclusion, using machine learning to diagnose kidney, liver, malaria, and pneumonia disorders has the potential to completely transform the healthcare sector by delivering quicker and more precise diagnoses, particularly in situations with limited resources. II. LITERATURE REVIEW A. System for Support Vector Machine-Based Diagnosis of Chronic Kidney Disease: In this paper, we propose the diagnosing the kidney infection utilizing Support Vector Machine. SVM is the calculation is employed for grouping and bunching. The essential thought of the calculation Support Vector Machine is searching for the ideal limit that is utilized to isolate the two bits of a class called the hyperplane. Scientists have applied SVM to do the arrangement task over different fields, for example, emotional registering. The motivation behind the improvement of this framework is a choice emotionally supportive network in diagnosing of kidney illness what's more, foreseeing whether or not renal disease patients have started to have persistent kidney disease. B. Liver Disease prediction using Classification Algorithms: In this exploration work, different characterization calculations in particular Support Vector Machine and K-Nearest Neighbors have been utilized for liver illness expectation. The correlation of this multitude of calculations been finished in light of characterization exactness which is viewed as Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 1s (2025) 152 https://internationalpubls.com through confusion grid. From the trial, Logistic Regression also, K-Nearest Neighbors have the most noteworthy exactness yet Logistic Regression have the most note worthy responsiveness. In this way it can be reasoned that Logistic Regression is fitting for anticipating liver illness. C. Malaria Disease Prediction Based on Machine Learning: As referenced, this paper has effectively satisfied its objectives with a significant commitment over existing machine learning innovation where ELM beats generally existing models on Malaria RBC illness expectation with a precision of 97. Furthermore, this outcomes in a high preparation speed. Its execution is straightforward, and addressing complex can be utilized issues in related region. Inside the benefits of ELM and its extremely execution contrasted and other ML, its verification that ELM is strongly suggest being utilized in Malaria fever RBCs prediction. D. Deep Learning for Pneumonia Diagnosis from Chest X-Ray Images: The two CNN networks coverage of the pneumonia disease was taken into consideration when writing this evaluation. Transfer learning and fine-tuning were both used in the development of our model. They examined the outcomes of two network tests after the stage of preparation. VGG16 network performs worse than exception network for identifying pneumonia patients. At separating common cases, the VGG16 network is more successful concurrently. III. PROPOSED WORK AND DESIGN METHODS FOR MODELS A. SYSTEM FOR EXISTING APPROACH A significant number of surviving investigations included examining specific sickness. At the point when a user needs to examine diabetes necessities to utilize one doctor’s prescription and same user needs to investigate coronary illness then client needs to utilize another doctor’s prescription. This is a time taking process. And further more in the event that any client having more than one sickness be that as it may, in existing framework in the event that anticipating just a single disease is capable then there is an opportunity of death rate increment due to not ready to foresee the other illness ahead of time. B.PROPOSEDAPPROACH It is possible to predict more than one illness at a time using a multi-sickness model. So, user compelling reason need to navigate many models to foresee the illnesses. It will lessen time and further more due to foreseeing various illnesses all at once there is a possibility decreasing death rate. In multiple diseases prediction, it is feasible to anticipate more than each illness in turn. So, the client doesn't need to cross various destinations to anticipate the sicknesses. We are taking four sicknesses that are Kidney, Liver, Malaria and Pneumonia. To execute numerous illness investigations, we will utilize ML algorithms and deep learning algorithms and Flask. At the point when the client is getting to this Programming interface, the client needs to send the boundaries of the sickness alongside the sickness name. The following stages are part of the suggested method for using machine learning and the Flask API to predict kidney, liver, malaria, and pneumonia diseases. The initial stage is to acquire sizable Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 1s (2025) 153 https://internationalpubls.com datasets of patient data and medical pictures pertinent to the diseases of interest. Then, any unnecessary or missing information is removed from this data through preprocessing and cleaning. After preprocessing the data, supervised learning techniques are used to train machine learning algorithms. On the basis of the labeled data, the algorithms learn to make predictions (i.e., data where the diagnosis is known). To reach an acceptable degree of accuracy, the models can be adjusted and retrained as necessary. After training, numerous metrics, including accuracy, precision, recall, and F1 score, are used to assess how well the machine learning models performed. The models are then adjusted or retrained in order to obtain an acceptable degree of accuracy. The development of a Flask API incorporates the machine learning models after they have been trained and assessed. The API returns the estimated likelihood that a patient will contract a specific disease after receiving patient data and medical photos as inputs. The Flask API is then made available to users over the internet by being deployed to a web server. This makes it simple for individuals and medical professionals to utilize the disease prediction system and get precise diagnoses. A user-friendly interface that enables patients to simply input their data and medical photos and receive forecasts regarding the propensity to develop a specific condition can be created. The Flask API can be combined with this interface to increase the illness prediction system's usability and accessibility. By allowing for early intervention to stop the onset of catastrophic diseases and by offering quick and precise diagnostics, this technology has the potential to completely transform the healthcare sector. C.PROPOSED SYSTEM ARCHITECTURE Fig:1 Proposed System Architecture D.DATASET PREPARATION For a framework to anticipate legitimate outcomes, first it ought to be prepared appropriately with existing information. Pre-Handling the information is significant so great quality information is Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 1s (2025) 154 https://internationalpubls.com utilized for preparing the model. Information cleaning and evacuation of missing values is a portion of the cycles engaged with Pre-processing. We utilized the Datasets of diseases from Kaggle Information from different sources has been gathered and collected E.PREDICTION USING VARIOUS DEEP LEARNING AND MACHINE LEARNING ALGORIHTMS Article primary center is to construct a multi disease prediction model so ML and profound learning strategies utilized are momentarily summed up here. Kidney disease, Liver sickness prediction and malaria and pneumonia discovery are broken down by different profound learning methods have been utilized to view the status of the patient. For Kidney disease prediction we have utilized many ML algorithms like Gradient Boosting classifier, Stochastic Gradient Boosting, XG Boost, Ada Boost, Cat Boost classifier, Gradient Boosting classifier etc. Among these Extra Trees classifier results about 99% exactness, for Liver disease characterization Random forest yield 77% exactness among all other algorithms such as Ada Boost, Gradient Boosting, Randomized search CV, Grid search CV. Malaria and Pneumonia examination contains red blood cell pictures and chest X ray pictures. So utilized the python’s tensor flow library for investigating the pictures. Convolution neural networks and deep learning techniques are used in the model's construction and testing on the test set. For Malaria prediction we have used Inception v3 algorithm. Inceptionv3is a convolution neural network for aiding picture investigation and item discovery. The discussed algorithm gave 96% accuracy. For Pneumonia prediction we have utilized VGG 19 algorithmwhichgaveabout92%accuracy. F.DATA FLOW Fig:2 Working Model of the proposed system Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 1s (2025) 155 https://internationalpubls.com We conducted experiments on these four diseases in the above figure. The Chronic Kidney disease dataset, Indian Liver dataset, Malaria cells Images dataset and chest X-Rays Image dataset respectively, have been imported as the first stage for the datasets for Kidney disease, Liver disease, Malaria and pneumonia disease. The depiction of each inputted value occurs once the dataset has been imported. The data is split into training as well as testing on the updated dataset following pre- processing, which includes checking for outliers, missing values, and scaling the dataset. Next, we applied various learning algorithms to the training dataset, then we used the testing dataset to apply what we knew about the classified algorithm. Knowledge will be put to use, and the best algorithm will be chosen. The model behavior of the best algorithm for each disease is saved using pickle processing, which includes checking for outliers, missing values, and scaling the dataset. Next, we applied various learning algorithms to the training dataset, then we used the testing dataset to apply what we knew about the classified algorithm. Knowledge will be put to use and the best algorithm will be chosen. The model behavior of the best algorithm for each disease is saved using pickle. IV. DATASETS USED: KIDNEY DISEASE DATASET: Table:1 Sample Kidney Disease Dataset. Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 1s (2025) 156 https://internationalpubls.com LIVER DISEASE DATASET: Table:3 Sample Liver Disease Dataset. MALARIA DISEASE DATASET: Table:4 Sample Malaria Disease Dataset. Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 1s (2025) 157 https://internationalpubls.com PNEUMONIA DISEASE DATASET: Table:5 Sample Pneumonia Disease Dataset. V. RESULTS LOGIN AND REGISTRATION PAGE: INTERFACE FOR KIDNEY DISEASE PREDICTION: Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 1s (2025) 158 https://internationalpubls.com RESULT FOR KIDNEY DISEASE PREDICTION: INTERFACE FOR LIVER DISEASE PREDICTION: RESULT FOR LIVER DISEASE PREDICTION: Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 1s (2025) 159 https://internationalpubls.com INTERFACE FOR MALARIA DISEASE PREDICTION: RESULT AFTER UPLOADING THE RBC PICTURE: INTERFACE FOR PNEUMONIA DISEASE PREDICTOR: Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 1s (2025) 160 https://internationalpubls.com DISPLAYING THE STATUS OF PATIENT AFTER UPLOADING CHEST X-RAY PICTURE: ACCURACIES: VI.CONCLUSION To sum up, the application of machine learning and the Flask API to the multi-illness prediction process has the potential to significantly raise the precision and effectiveness of disease detection in the healthcare sector. Machine learning algorithms can learn to spot patterns and symptoms associated with different diseases by being trained on vast datasets of patient information and medical pictures. This allows for more precisediagnosis. Healthcare professionals and patients can readily access the disease prediction system online thanks to the machine learning models' deployment as a Flask API. The creation of a user-friendly interface can improve the disease prediction system's usability and accessibility by allowing patients to enter their data and get estimates of how likely they are to contract a specific condition. Overall, the application of machine learning and the Flask API for multi-disease prediction has the potential to significantly raise the standard of healthcare, particularly in places with limited resources, and to save lives by enabling early intervention and the avoidance of dangerous diseases. VII. FUTURE ENHANCEMENTS The future enhancements for multi-disease prediction using machine learning and Flask API could include DISEASE BEST ALGORITHM DETECTED RESULTED ACCURACY KIDNEY DISEASE Extra trees classifier 99% LIVER DISEASE Random Forest 77% MALARIA Inceptionv3 96% PNEUMONIA VGG-19algorithm 92% Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 1s (2025) 161 https://internationalpubls.com Improved data collection: As more patient information and medical images become available, the size and quality of the datasets used to train the machine learning algorithms can be improved, leading to more accurate diagnoses Integration with electronic health records (EHRs): The disease prediction system could be integrated with EHRs, allowing healthcare professionals to quickly and easily access patient information and receive predictions about the likelihood of developing a particular disease Real-time predictions: The Flask API could be optimized to provide real-time predictions, enabling healthcare professionals to make fast and accurate diagnoses and enabling early intervention to prevent the onset of serious diseases. Incorporation of additional data sources: The machine learning algorithms could be trained on additional data sources, such as genetic information or environmental data,to provide even more accurate predictions. Improved interpretability: The machine learning algorithms could be developed to provide interpretable predictions, allowing healthcare professionals to understand the reasoning behind a particular prediction and to make more informed decisions. Personalized predictions: The disease prediction system could be developed to provide personalized predictions based on individual patient information, leading to more accurate diagnoses and better patient outcomes. VIII.REFERENCES [1] E.E.Shair, M.M.Mehdyand P.Y.Ng, "Artificial Neural Networks in Image Processing for Earlier Detection of Breast Cancer". [2] Jwan K. Alwan,Mohammad B. Naeem Mohamed Ibrahim, DhafarHamed,"The Utilisationof Machine Learning Approaches for Medical Data Classification [3] Rakesh Kumar,Archana Singh “Heart Disease Prediction Using Machine Learning Algorithms” [4] Baddigam Jaya Krishna Reddy,A.Sivasangari, Annamareddy Kiran, P.Ajitha,” Diagnosis of Liver Disease using Machine Learning Models” [5] Priyanka Sonar, Prof. K. JayaMalini,” Diabetes Prediction Using Different Machine Learning Approaches. [6] ”Support vector machine based disease classification model employing hasten eagle cuculidae search optimization”, concurrency and computation: practice and experience, ISSN : 1532-0626, Vol-34, Issue-25 (Nov-2022), Wiley Publisher. [7] “Regression based price prediction of staple food materials using multivariate Models”, Scientific Programming, ISSN : 1058-9244, Vol-2022(June), Hindawi Publisher. [8] “Parkinson’s Disease Prediction and Classification Using Machine Learning Techniques”, Journal of Optoelectronics Laser, ISSN : 1005-0086, Vol-41, Issue-5, 2022, Page No: 690-698. [9] “A Study on Defensive Issues and Challenges in Internet of Things”, Lecture Notes in Electrical [10] ”Disease Prediction and Diagnosis Implementing Fuzzy Neural Classifier based on IoT and Cloud”, International Journal of Advanced Science and Technology (IJAST), ISSN : 2005-4238, Vol-29 Issue-5, May 2020, Page No: 737-745. Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 1s (2025) 162 https://internationalpubls.com [11] " Rotating Solar Trees ", Lecture Notes in Electrical Engineering 601, Springer Nature Singapore Pte Ltd. 2020, Page No: 482-487. [12] " Wireless-Sensor-Network with Mobile Sink Using Energy Efficient Clustering ", Lecture Notes on Data Engineering and Communications Technologies , Springer Nature Switzerland AG. 2020, Page No: 582-589. [13] "Research of Feature Selection Methods to Predict Breast Cancer", International Journal of Recent Technology and Engineering(IJRTE), ISSN : 2277-3878, Vol-8 Issue-2s11, Sep 2019, Page No: 2353-2355. [14] ”Suicide Prediction on Social Media by Implementing Sentimental Analysis along with Machine Learning”, International Journal of Recent Technology and Engineering(IJRTE), ISSN : 2277-3878, Vol-8 Issue-2, July 2019, Page No: 4833-4837. [15] “Issues for building an Artificial Intelligent System” JARDCS, Vol-7 Issue-13, Dec 2018, ISSN : 1943-023X, Page No: 1447-1451. [16] “Late Patterns In Chart Model For Content Examination And Content Mining” IJPT, ISSN: 0975-766X, Volume-8, Issue-2, June-2016, page no: 14729-14736. [17] Priyadarshini, M. Asha, et al. "A Multi-Feature Approach with Data Augmentation for Speech Emotion Recognition using Deep Learning." ICCIET-2024. Atlantis Press, 2024 https://doi.org/10.2991/978-94-6463-471- 6_80 [18] Patro, Pramoda, et al. "A hybrid approach estimates the real-time health state of a bearing by accelerated degradation tests, Machine learning." 2021 Second International Conference on Smart Technologies in Computing, Electrical and Electronics (ICSTCEE). IEEE, 2021 [19] Priyadarshini, M. Asha, et al. "A Visionary Approach to Anemia Detection: Integrating Eye Condition Data and Machine Learning." ICCIET-2024. Atlantis Press, 2024. https://doi.org/10.2991/978-94-6463-471-6_75 . https://link.springer.com/bookseries/15362 https://link.springer.com/bookseries/15362 https://doi.org/10.2991/978-94-6463-471-6_80 https://doi.org/10.2991/978-94-6463-471-6_80 https://doi.org/10.2991/978-94-6463-471-6_75