Inspiration
We wanted to create a health-related AI model, and the CDC data set we found was really thorough and easy to work with.
What it does
The website takes information from the user and uses an AI model based on a CDC dataset to predict the risk and type of diabetes the user could potentially get.
How we built it
We used HTML and CSS for the frontend and the Flask web dev framework for the backend.
Data
https://www.kaggle.com/datasets/alexteboul/diabetes-health-indicators-dataset
AI Model
We used scikit-learn to scale our selected features and train a K-Nearest Neighbors model. We exported the model and scaler using the Python pickle library. After the user inputs their data on the home page through HTML, the data is sent to Python through the POST method of the /data route. The model and scaler are loaded and the features inputted by the user are processed and scaled. The model gives the 5 closest data points of the user's data and the app uses another csv file to look up the index of each data point and display the mode of the diabetes indicators for these 5 data points and the confidence level (what percentage of these datapoints had the result value). The numbers 0, 1, and 2 come from the Kaggle dataset and they represent different types of diabetes. 0 means no diabetes, 1 means prediabetes, and 2 means diabetes.
Challenges we ran into
A challenge we ran into was choosing which variables to include in our model that would give the most accurate result. We also had trouble collaborating on the code because our VS Code Live Share crashed multiple times. We were also unable to deploy our website on our .tech domain in time.
Accomplishments that we're proud of
We're proud of getting a functional website up and running.
What we learned
We learned how to incorporate Python into a webpage and how to make datasets to make AI models.
What's next for Diabetech
Next, we would like to add more factors that more accurately identify the level of risk for diabetes. We would also like to train the model so it weights the different variables according to their importance.
We hope for our web app to assist users in detecting their risk for diabetes at an early stage, potentially saving them health costs and preventing the development of other ailments.
Log in or sign up for Devpost to join the conversation.