Skip to content

ankit-sengupta05/Echo-Personal-AI-Health-Assistant

Repository files navigation

Typing SVG

Python Tkinter FuzzyWuzzy Pandas License Platform Diseases Status


βš•οΈ Disclaimer: Echo is an educational AI tool. It does not replace professional medical advice, diagnosis, or treatment. Always consult a qualified healthcare provider.


🧬 What is Echo?

Echo is a desktop AI health assistant built with Python and Tkinter that helps users identify possible health conditions based on their symptoms using fuzzy logic matching. It provides personalised medication guides, diet plans, and tracks your session history β€” all from a clean, dark-themed GUI powered by CSV datasets.

User enters symptoms  β†’  FuzzyWuzzy AI matches  β†’  Top diseases ranked by confidence
        ↓                                                       ↓
  Session logged    ←   Diet Plan loaded       ←   Medications displayed

✨ Features at a Glance

πŸ” Symptom Intelligence

  • Fuzzy logic matching via FuzzyWuzzy
  • Handles typos, partial words, synonyms
  • Adjustable sensitivity threshold (40–90%)
  • Confidence score per disease match
  • Top 5 ranked results with visual bars

πŸ’Š Medication Guide

  • 3 medications per condition with dosages
  • OTC vs Prescription classification
  • Important precautions & warnings
  • Auto-loaded from symptom results
  • Covers 20 diseases in the dataset

πŸ₯— Diet & Nutrition

  • Foods to eat AND foods to avoid
  • Personalised sample meal plans
  • Daily hydration recommendations
  • Supplement & vitamin suggestions
  • Based on clinical nutritional guidelines

πŸ“‹ Session History

  • Timestamped symptom check logs
  • Top match + confidence recorded
  • Full session review in one view
  • One-click history clear
  • Lightweight in-memory storage

πŸ—‚οΈ Project Structure

πŸ“¦ echo_health_assistant/
β”‚
β”œβ”€β”€ πŸš€ main.py                ← Entry point β€” run this
β”œβ”€β”€ πŸ–₯️  app.py                ← Main Tkinter GUI (4 tabs)
β”œβ”€β”€ 🧠 symptom_engine.py      ← FuzzyWuzzy matching logic
β”œβ”€β”€ πŸ’Ύ health_tracker.py      ← Medication & diet + history
β”œβ”€β”€ 🎨 ui_components.py       ← Custom dark-theme widgets
β”œβ”€β”€ πŸ“„ requirements.txt
β”‚
└── πŸ“‚ data/
    β”œβ”€β”€ πŸ—ƒοΈ  symptoms.csv       ← 20 diseases Γ— 6 symptoms each
    β”œβ”€β”€ πŸ’Š medications.csv    ← 3 meds + dosages per disease
    └── πŸ₯— diet_plans.csv     ← Full diet + supplement plans

πŸ–₯️ GUI Layout

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  πŸ’Š Echo β€” Personal AI Health Assistant       [FuzzyWuzzy AI]   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  πŸ” Symptom      β”‚ πŸ’Š Medications  β”‚ πŸ₯— Diet   β”‚  πŸ“‹ History     β”‚
β”‚  Checker         β”‚ Guide          β”‚ Plans     β”‚                 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚ Describe Symptoms   β”‚   β”‚ Analysis Results                 β”‚ β”‚
β”‚  β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚   β”‚  #1 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘ 87.4%      β”‚ β”‚
β”‚  β”‚ β”‚ headache, fever,β”‚ β”‚   β”‚  #2 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 61.2%      β”‚ β”‚
β”‚  β”‚ β”‚ nausea...       β”‚ β”‚   β”‚  #3 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 43.8%      β”‚ β”‚
β”‚  β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚   β”‚                                  β”‚ β”‚
β”‚  β”‚ Sensitivity: [60%]  β”‚   β”‚  πŸ† Most Likely: Influenza       β”‚ β”‚
β”‚  β”‚ [πŸ” Analyze] [βœ–]   β”‚   β”‚  Confidence: 87.4%               β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚                                                                  β”‚
β”‚  βš•οΈ Not a substitute for professional medical advice             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

βš™οΈ How the AI Matching Works

                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚   User Input (raw text)      β”‚
                    β”‚   "headache, fevr, nausea"   β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                   β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚   Tokenize & Normalize       β”‚
                    β”‚   Split by comma / newline   β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                   β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚   FuzzyWuzzy Matching        β”‚
                    β”‚   token_sort_ratio per sym   β”‚
                    β”‚   "fevr"  β†’ "fever"  (94%)   β”‚
                    β”‚   "headach"β†’"headache"(91%)  β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                   β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚   Disease Scoring Formula    β”‚
                    β”‚                              β”‚
                    β”‚   Score = (FuzzyQ Γ— 0.6)     β”‚
                    β”‚         + (Coverage Γ— 0.4)   β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                   β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚   Top 5 Ranked Results       β”‚
                    β”‚   + Visual Confidence Bars   β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Installation & Setup

Prerequisites

  • Python 3.8 or higher
  • pip package manager
  • Windows / macOS / Linux

Step-by-Step Commands

# 1️⃣  Navigate to project folder
cd echo_health_assistant

# 2️⃣  Create a virtual environment
python -m venv venv

# 3️⃣  Activate venv
venv\Scripts\activate        # Windows
source venv/bin/activate     # Mac / Linux

# 4️⃣  Install dependencies
pip install fuzzywuzzy python-Levenshtein pandas Pillow

# 5️⃣  Launch Echo
python main.py

πŸ“¦ Dependencies

Package Version Purpose
fuzzywuzzy 0.18.0 Fuzzy string matching for symptoms
python-Levenshtein 0.21.1 Speeds up FuzzyWuzzy by 4–10Γ—
pandas 2.1.4 CSV dataset loading & querying
Pillow 10.2.0 Image support for Tkinter
tkinter built-in GUI framework (no install needed)

🩺 Supported Conditions (20 Diseases)

🀧 Common ColdπŸ€’ Influenza🦠 COVID-19πŸ€• Migraine
❀️ Hypertension🍬 Diabetes Type 2πŸ’¨ Asthma🩸 Anemia
πŸ«€ Gastritis😰 Anxiety DisorderπŸ˜” Depression🦠 UTI
🦴 ArthritisπŸ¦‹ Thyroid Disorder🦟 Dengue Fever🫁 Pneumonia
πŸ«ƒ IBS🧴 EczemaπŸ‘ƒ SinusitisπŸͺ¨ Kidney Stones

πŸ”‘ Key Technical Points

  • Fuzzy Matching: Uses fuzz.token_sort_ratio β€” handles typos, word-order variations, and partial matches perfectly for medical symptom text
  • Confidence Formula: Weighted blend: 60% fuzzy quality + 40% symptom coverage ratio β€” avoids false positives from single-symptom hits
  • Threading: Symptom analysis runs on a background thread so the GUI stays fully responsive during processing
  • CSV Architecture: All disease data in plain CSV β€” extend the dataset by simply adding rows, zero code changes required
  • Rich Text Tags: Tkinter Text widget uses named tags (heading, success, warning) for coloured output β€” requires foreground= not fg= in tag_configure
  • Auto-fill Tabs: After analysis, Medications and Diet tabs automatically pre-load data for the top-matched disease
  • Session Logging: Every symptom check is timestamped and stored in-memory, visible in the History tab

πŸ› Common Error & Fix

bitmap "#00D9C0" not defined

_tkinter.TclError: bitmap "#00D9C0" not defined

Root Cause: Tkinter's Text.tag_configure() does not accept fg= β€” it requires foreground=

# ❌ WRONG β€” causes TclError on all platforms
self.text.tag_configure("heading", fg="#00D9C0", font=...)

# βœ… CORRECT β€” use foreground= for Text widget tags
self.text.tag_configure("heading", foreground="#00D9C0", font=...)

This fix is already applied in the latest ui_components.py.


πŸ—ΊοΈ Architecture Flow

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  main.py    │────▢│   EchoApp()      │────▢│  4 Notebook Tabs   β”‚
β”‚  Entry Pointβ”‚     β”‚   app.py         β”‚     β”‚  Symptom / Med /   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚  Diet / History    β”‚
                              β”‚               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
               β–Ό              β–Ό              β–Ό
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚ symptom_     β”‚  β”‚ health_      β”‚  β”‚  ui_components.py    β”‚
    β”‚ engine.py    β”‚  β”‚ tracker.py   β”‚  β”‚  CardFrame           β”‚
    β”‚              β”‚  β”‚              β”‚  β”‚  EchoButton          β”‚
    β”‚ FuzzyWuzzy   β”‚  β”‚ Medications  β”‚  β”‚  ScrollText          β”‚
    β”‚ Scoring      β”‚  β”‚ Diet Plans   β”‚  β”‚  ConfidenceBar       β”‚
    β”‚ Ranking      β”‚  β”‚ History Log  β”‚  β”‚  TagEntry / Badge    β”‚
    β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚                 β”‚
           β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    β–Ό
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚      data/          β”‚
         β”‚  symptoms.csv       β”‚
         β”‚  medications.csv    β”‚
         β”‚  diet_plans.csv     β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🀝 Contributing

  1. Fork the repository
  2. Branch: git checkout -b feature/add-more-diseases
  3. Extend CSV files with new diseases
  4. Commit: git commit -m "Add 10 more diseases to dataset"
  5. Open a Pull Request

Ideas Welcome

  • More diseases & symptoms in CSV
  • BMI / vitals calculator tab
  • PDF report export
  • Voice symptom input
  • Real medical API integration (e.g. OpenFDA)

πŸ“œ License

This project is licensed under the MIT License β€” free to use, modify, and distribute.


Built with πŸ’Š by the Echo Team

Empowering people with health awareness β€” not replacing doctors

About

Echo is a Personal AI Health Assistant built in Python with a sleek Tkinter GUI. Analyze symptoms using AI-driven algorithms, track medications, plan diets, and maintain health history. Perfect for anyone seeking a Python-based health tracker, symptom checker, or AI wellness assistant.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages