Skip to content

Reboot2004/BITS-CSA

Repository files navigation

Health Wellness App

A comprehensive health and wellness application that combines AI/ML technologies with modern mobile development to provide personalized health insights and medical assistance.

🎯 Project Overview

This application is an innovative health platform that leverages artificial intelligence and machine learning to provide users with:

  • AI-Powered Health Chatbot: Intelligent medical assistance using BioBERT model
  • Disease Prediction: Machine learning model for diabetes prediction
  • Secure Authentication: User registration and login system
  • Modern UI/UX: Clean, intuitive Flutter-based mobile interface

πŸ—οΈ Architecture

The application follows a hybrid architecture:

  • Frontend: Flutter mobile application with cross-platform support
  • Backend: Python Flask API with AI/ML capabilities
  • Database: Supabase for user authentication and data storage
  • AI Models: BioBERT for medical Q&A, Random Forest for disease prediction

✨ Features

1. User Authentication

  • Secure user registration and login
  • Password-based authentication via Supabase
  • Session management and auto-logout

2. AI Medical Chatbot

  • BioBERT Integration: Uses the specialized biomedical BERT model (dmis-lab/biobert-v1.1)
  • Real-time Medical Q&A: Provides accurate answers to health-related queries
  • Context-Aware Responses: Fetches relevant medical information from web sources
  • Reference Citations: Includes links to authoritative medical sources

3. Disease Prediction Model

  • Diabetes Risk Assessment: ML model trained on medical parameters
  • Input Parameters:
    • Number of pregnancies
    • Glucose levels
    • Blood pressure
    • Skin thickness
    • Insulin levels
    • BMI (Body Mass Index)
    • Diabetes pedigree function
    • Age
  • Prediction Output: Risk assessment with probability scores

4. Modern Mobile Interface

  • Clean, responsive Flutter UI
  • Cross-platform compatibility (Android, iOS, Web, Desktop)
  • Intuitive navigation and user experience
  • Material Design principles

πŸ› οΈ Technology Stack

Frontend

  • Flutter: Cross-platform mobile development
  • Dart: Programming language for Flutter
  • Material Design: UI/UX framework
  • HTTP: API communication

Backend

  • Python: Core backend language
  • Flask: Web framework
  • Flask-CORS: Cross-origin resource sharing
  • Transformers: Hugging Face library for BioBERT
  • Scikit-learn: Machine learning framework
  • Pickle: Model serialization
  • Requests: HTTP client for external APIs

Database & Authentication

  • Supabase: Backend-as-a-Service platform
  • PostgreSQL: Database (via Supabase)
  • JWT: Token-based authentication

AI/ML Models

  • BioBERT: Biomedical language model for Q&A
  • Random Forest: Disease prediction model
  • SerpAPI: Web search integration for medical context

πŸ“± App Structure

lib/
β”œβ”€β”€ main.dart              # App entry point and routing
β”œβ”€β”€ home_page.dart         # Dashboard with navigation
β”œβ”€β”€ login_page.dart        # User authentication
β”œβ”€β”€ signup_page.dart       # User registration
β”œβ”€β”€ chatbot_page.dart      # AI medical chatbot interface
β”œβ”€β”€ ml_model_page.dart     # Disease prediction form
β”œβ”€β”€ profile_page.dart      # User profile management
β”œβ”€β”€ app.py                 # Flask backend API
β”œβ”€β”€ BIO_GPT.ipynb         # Model training notebook
└── random_forest_model.pkl # Trained ML model

πŸš€ Getting Started

Prerequisites

  • Flutter SDK (>=3.4.3)
  • Python 3.8+
  • Supabase account
  • SerpAPI account (for web search functionality)

Installation

  1. Clone the repository

    git clone <repository-url>
    cd health
  2. Install Flutter dependencies

    flutter pub get
  3. Install Python dependencies

    pip install -r requirements.txt
  4. Environment Setup Create a .env file in the root directory:

    SUPABASE_URL=your_supabase_url
    SUPABASE_ANON_KEY=your_supabase_anon_key
    SERPAPI_KEY=your_serpapi_key
  5. Run the Backend API

    python app.py
  6. Run the Flutter App

    flutter run

πŸ”§ Configuration

Supabase Setup

  1. Create a new Supabase project
  2. Set up authentication with email/password
  3. Add your Supabase URL and anon key to the .env file

SerpAPI Setup

  1. Sign up for a SerpAPI account at https://serpapi.com
  2. Get your API key from the dashboard
  3. Add the SERPAPI_KEY to your .env file

πŸ“Š Machine Learning Models

BioBERT Chatbot

  • Model: dmis-lab/biobert-v1.1
  • Purpose: Medical question answering
  • Features: Context-aware responses, reference citations
  • Max Length: 512 tokens

Diabetes Prediction Model

  • Algorithm: Random Forest Classifier
  • Features: 8 medical parameters
  • Output: Binary classification (diabetic/non-diabetic) with probabilities
  • Accuracy: Trained on standard diabetes dataset

πŸ” Security Features

  • Secure user authentication via Supabase
  • Environment variable protection for sensitive keys
  • CORS configuration for API security
  • Input validation and error handling
  • Session management with automatic logout

πŸ“š API Endpoints

/chat (POST)

  • Purpose: Medical chatbot interaction
  • Input: {"message": "user_query"}
  • Output: AI response with references

/predict (POST)

  • Purpose: Disease prediction
  • Input: Medical parameters array
  • Output: Prediction result with probability

🎨 UI/UX Features

  • Responsive Design: Adapts to different screen sizes
  • Material Design: Follows Google's design principles
  • Intuitive Navigation: Easy-to-use interface
  • Loading States: Visual feedback during API calls
  • Error Handling: User-friendly error messages

πŸ”„ Development Workflow

  1. Frontend Development: Flutter for cross-platform mobile app
  2. Backend Development: Python Flask for AI/ML APIs
  3. Model Training: Jupyter notebooks for ML model development
  4. Testing: Comprehensive testing for both frontend and backend
  5. Deployment: Cloud deployment with CI/CD pipeline

🌟 Future Enhancements

  • Additional ML models for different diseases
  • Integration with wearable devices
  • Telemedicine consultation features
  • Personalized health recommendations
  • Health data visualization
  • Multi-language support
  • Offline mode capabilities

πŸ“„ License

This project is part of BITS CSA (Computer Science and Applications) coursework and is intended for educational purposes.

🀝 Contributing

This is an academic project. For any suggestions or improvements, please reach out to the development team.

πŸ“ž Support

For technical support or queries related to this project, please contact the development team through the appropriate academic channels.


This application represents the intersection of healthcare technology and artificial intelligence, demonstrating how modern mobile development can be combined with advanced AI/ML models to create meaningful health solutions.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors