Experience the interactive clinical dashboard here: Diabetes Prediction Web App
This repository contains a data-driven web application that integrates a pre-trained machine learning model into an interactive clinical dashboard. Built with Streamlit and PyCaret, the application utilizes a tuned Random Forest classifier to predict the likelihood of diabetes based on standard diagnostic measurements.
This project demonstrates the deployment phase of the CRISP-DM lifecycle, showcasing how to transition a trained model (.pkl) into an accessible, user-friendly tool for real-time inference.
- Interactive Clinical Inputs: A clean user interface allowing the input of 8 critical health metrics, including Glucose, BMI, Insulin levels, and Blood Pressure.
- Integrated PyCaret Pipeline: Utilizes PyCaret's
predict_modelfunctionality, ensuring that data transformations and model inference are handled seamlessly under the hood. - Automated Data Structuring: The app automatically captures user inputs and converts them into a structured Pandas DataFrame format required by the machine learning model.
- Real-Time Inference: Instantaneous prediction generation with robust error handling to prevent app crashes if the model file is missing or inputs are invalid.
- Language: Python 3.10+
- Web Framework: Streamlit
- Machine Learning: PyCaret (Classification)
- Data Manipulation: Pandas
-
Clone the repository:
git clone [https://github.com/yourusername/diabetes-prediction-app.git](https://github.com/yourusername/diabetes-prediction-app.git) cd diabetes-prediction-app -
Ensure Model is Present: Verify that the pre-trained model file tuned_rf_diabetes.pkl is located in the root directory of the project.
-
Install the required dependencies:
pip install streamlit pandas pycaret
(Note: PyCaret is a heavy library. It is recommended to run this in an isolated virtual environment).
- Run the Streamlit App:
streamlit run app.py
- Access the Dashboard: Open your browser and navigate to the local URL provided in your terminal (usually http://localhost:8501).
Femi James Data & Business Analyst | Integrated AI Specialist
(Don't forget to update the yourusername placeholder in the clone link before you commit it!)