DiaGuide: Diabetes Risk Prediction App
Introduction
Hi there!
I built my first fully functional website, implementing AI to predict diabetes risk using historical data. This was my first time publishing a real, working website—and I am honestly proud of the result. And I built all this during 48-hour hackathon, working solo.
I used Streamlit for the UI, scikit-learn for the AI training, and a model. Here is how:
The Idea
When the project topic was first released, I was slightly surprised to see healthcare — most of the hackathons I had joined previously allowed more open-ended, general tech solutions. But then I started thinking , and this pushed me to research more deeply.
Since I was good at data analysis and developing ML models, I decided to focus on those areas. I spent all of Friday and Saturday morning brainstorming ideas. I actually came up with a couple :
Because of the reasons I mentioned above, I decided to pivot. But I still liked the idea of using a questionnaire to determine something important.
So I shifted gears to something more specific — a disease or mental health condition. I was very indecisive at first, but then I found a very useful diabetes dataset, and the parameters made sense to me. That’s when I committed to building DiaGuide.
⚙️ Tools & Stack
Language(s): Python
Frontend
- Tools & Libraries: Streamlit
- ❓ Why I chose it: I needed a simple library that I could use to create layout and I needed it fast ♂️. As someone who doesn't have much experience in frontend design, Streamlit helped me a lot with being beginner-friendly and having a good documentation and tutorials. It was the perfect tool to create data-heavy app that requires minimal UI design.
- ️ How I used it: It was basically the cornerstone of my UI. Everything—from layout to interactivity—was built using Python. No HTML, no CSS, just clean Python code.
Machine Learning
- Tools & Libraries: scikit-learn
- Model Type(s): Logistic Regression, Random Forest, Gradient Boosting
- Data Cleaning Libraries: Pandas, Numpy
- Performance/Evaluation: I created 3 different models and evaluated each one of them by getting their ROC curve. This evaluation checks how successful the model is using the test sample when 1 = exact, 0.5 = same as randomly choosing:
- Logistic Regression: 0.81, very fast ⚡
- Gradient Boosting: 0.82, okay speed ⌛
- Random Forest: 0.77, slows down the code significantly and slower server response
- Result: Logistic Regression—it didn't have much accuracy difference with Gradient Boosting but was significantly faster.
Dataset
- Source: Kaggle / UCI Machine Learning Repository
- Link: https://www.kaggle.com/datasets/alexteboul/diabetes-health-indicators-dataset/data
- Features Used: BMI, Age, Blood Pressure, etc.
- Why this dataset: ✅ Clean, ️ labeled, interpretable
- Additional Notes: I didn't use two of the columns in the database—education level and income—because I thought they were more personal. Also, I evaluated with and without them and they only increased the accuracy by 1%, which is not significant.
Hosting & Deployment
- Where I deployed: Streamlit Cloud
- GitHub Repository: SuleymanSade/DiaGuide
- Streamlit App: DiaGuide App
- ️ How I did it: I put all the libraries I used into
requirements.txt
➡️ Configured Git LFS to fit my models (since some of them were bigger than 100MB) ➡️ Created a GitHub repo & pushed the code ➡️ Set up Streamlit Cloud and it was ready to go
- ❓ Why I used Streamlit Cloud: It was free-to-use and really simple to set up. It also connected to the repository, so if I make a change in the future, the website is going to update too.
I write about learning AI by building real tools, not just tutorials.