DEV Community

Cover image for Building a Smart AI Health Assessment Chatbot with Streamlit and Generative AI
swapnil shingare
swapnil shingare

Posted on

Building a Smart AI Health Assessment Chatbot with Streamlit and Generative AI

In the world of preventive healthcare, data-driven insights can empower people to make better lifestyle decisions. That's why I built an AI-powered Health Assessment Chatbot that not only asks meaningful health-related questions but also generates detailed, personalized health analysis reports β€” all through a friendly and interactive web interface.

πŸš€ What I Built
The Health Assessment Chatbot is a smart application that:

Interactively asks health and lifestyle questions.

Performs real-time calculations and health evaluations.

Uses Generative AI to provide tailored recommendations.

Generates a comprehensive health report based on your responses.

Here’s a snapshot from a sample report it produces:

πŸ“Š Sample Health Summary
Overall Health Score: 76 / 100
Moderate risk: Good health with room for improvement.

Key Metrics:

BMI: 24.9 (Normal)

Waist-to-Height Ratio (WHTR): 0.471 (Good)

Resting Metabolic Rate: 1926 kcal/day

Daily Calorie Goal: 2312 kcal

Category Breakdown:

βœ… Body Profile: 95/100

⚠ Lifestyle: 79/100

⚠ Stress Management: 63.3/100

❌ Exercise: 20/100

βœ… Hydration: 90/100

Hydration Reminder: Drink ~12 glasses/day (current: 2750ml)

Personalized Tips: AI-generated suggestions for diet, exercise, and stress.

🧰 Tech Stack
This project combines the power of data science and modern web tools:

Python 🐍 – Core logic, health metric calculations.

Streamlit 🌐 – Quick and beautiful UI for interaction.

Generative AI 🧠 – Provides intelligent analysis and custom recommendations.

Pandas – For data wrangling.

NumPy – For numerical operations.

πŸ’‘ Key Features
πŸ€– Conversational UI: Feels like talking to a health assistant.

πŸ“ˆ Real-time Health Metrics: BMI, WHTR, BMR, hydration, calorie needs, and more.

πŸ“‹ AI Recommendations: Diet, exercise, sleep, and stress management tips.

πŸ“€ Exportable Report: Users can save or share their health reports.

πŸ” Assessment Retake: Restart the chat anytime to update data.

πŸ” How It Works
User answers health questions β†’ Age, weight, diet, activity, hydration, sleep, etc.

AI and Python backend calculates:

BMI, WHTR, Metabolic Rate

Daily calorie needs

Hydration percentage

LLM generates recommendations for improvement.

Streamlit renders a beautiful report with charts and metrics.

🎯 Future Plans
πŸ“± Mobile responsiveness and deployment to the cloud.

🩺 Doctor-mode integration for medical professionals.

🧬 Adding more complex indicators like blood sugar, lipid profile, etc.

πŸ“š Long-term trend analysis with user accounts.

πŸ™Œ Final Thoughts
Healthcare shouldn't be reactive. With AI and data, we can make it proactive. This project is just a small step in that direction β€” helping people understand and improve their health through meaningful interaction and actionable insights.

Let me know your thoughts, suggestions, or ideas to improve this further! πŸ’¬

Top comments (3)

Collapse
 
dotallio profile image
Dotallio

Love the level of actionable insight this gives! Any plans to let users integrate their own health data from wearables or export results to other apps?

Collapse
 
aibythabasvini profile image
Thabasvini

That sounds amazing! Going for personalized health care is a great way to track ourselves and manage our health. Cool! AI is making our lives manageable.

Collapse
 
richard_akintunde_4f08089 profile image
richard akintunde

This is amazing.