Skip to content

mireskandari/medgem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏥 MedGem: Your AI-Powered Medical Data Analysis Companion

MedGem Logo

Next.js Python Gemini AI

Revolutionizing Medical Data Analysis with AI

🌟 What is MedGem?

MedGem is an innovative medical data analysis platform that combines the power of Google's Gemini AI with intuitive data visualization and analysis tools. Built during a hackathon, this project aims to make medical data analysis more accessible, efficient, and insightful for healthcare professionals and researchers.

Devpost

MEDGEM on Devpost

Demo: Watch on YouTube

🚀 Features

🤖 AI-Powered Analysis

  • Seamless integration with Google's Gemini AI model
  • Natural language processing for medical data queries
  • Intelligent data interpretation and insights generation
  • Context-aware responses based on medical domain knowledge
  • Automated hypothesis generation with supporting evidence
  • Three-phase analysis process:
    1. Data Understanding and Cleaning
    2. Exploratory Data Analysis and Correlation Analysis
    3. Hypothesis Formulation

📊 Data Management

  • Support for various medical data formats (CSV, Excel, etc.)
  • Secure file upload and storage
  • Real-time data processing and analysis
  • Interactive data visualization
  • Comprehensive data cleaning and preprocessing:
    • Missing value handling with multiple strategies (mean, median, mode imputation)
    • Data format standardization (dates, times, units)
    • Outlier detection and handling
    • Data type validation and conversion
  • Advanced metadata extraction:
    • Basic file information (rows, columns, data types)
    • Descriptive statistics (min, max, mean, median, std dev)
    • Missing data analysis
    • Distribution characteristics
    • Relationship exploration

👥 User Experience

  • Modern, responsive web interface built with Next.js
  • Intuitive chat interface for data queries
  • Real-time feedback and suggestions
  • Session management and project organization
  • Interactive hypothesis visualization
  • Real-time code execution and results display
  • Support for iterative analysis and refinement

🛠️ Tech Stack

Frontend

  • Framework: Next.js 15.2.3
  • UI: React 19, TailwindCSS
  • Data Visualization: Custom components with MathJax support
  • Authentication: Supabase Auth
  • File Processing: PapaParse, XLSX
  • Markdown Support: React Markdown for hypothesis display

Backend

  • Framework: FastAPI
  • AI Integration: Google Gemini API
  • Database: Supabase
  • Deployment: Docker, Google Cloud Run
  • Data Processing: Pandas, NumPy
  • Code Execution: Jupyter Notebook environment

🚀 Getting Started

Prerequisites

  • Node.js 18+
  • Python 3.8+
  • Docker (optional)
  • Google Cloud Platform account (for deployment)
  • Google Gemini API key

Local Development

  1. Clone the repository:

    git clone https://github.com/yourusername/medgem.git
    cd medgem
  2. Set up the frontend:

    cd frontend
    npm install
    npm run dev
  3. Set up the backend:

    cd backend
    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    pip install -r docker/requirements.txt
    export PYTHONPATH=.
    python app/main.py
  4. Set up your environment variables:

    # Frontend (.env)
    NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
    NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_key
    
    # Backend
    export GOOGLE_API_KEY=your_gemini_api_key

🏗️ Project Structure

medgem/
├── frontend/           # Next.js frontend application
│   ├── src/           # Source code
│   ├── public/        # Static assets
│   └── package.json   # Frontend dependencies
├── backend/           # FastAPI backend service
│   ├── app/          # Application code
│   │   ├── api/      # API endpoints
│   │   ├── core/     # Core business logic
│   │   ├── models/   # Data models
│   │   └── database/ # Database interactions
│   ├── docker/       # Docker configuration
│   └── docs/         # Documentation
└── chatbot_wrapper.py # Gemini AI integration

🔍 Analysis Workflow

  1. Data Upload and Initial Processing

    • Upload medical data files (CSV/Excel)
    • Automatic metadata extraction
    • Data quality assessment
  2. Data Cleaning and Preprocessing

    • Missing value handling
    • Format standardization
    • Outlier detection
    • Data type validation
  3. Exploratory Data Analysis

    • Statistical analysis
    • Correlation studies
    • Distribution analysis
    • Relationship exploration
  4. Hypothesis Generation

    • AI-powered hypothesis formulation
    • Supporting evidence collection
    • Analytical method suggestions
    • Expected outcomes prediction

🤝 Contributing

We welcome contributions! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Google Gemini AI team for their powerful API
  • The Next.js and React communities for their excellent frameworks
  • All contributors and supporters of this project

🎉 Hackathon Achievement

This project was developed during a hackathon, demonstrating the power of rapid prototyping and modern AI integration in healthcare. It showcases how quickly we can build powerful tools that could potentially transform medical data analysis.


Made with ❤️ by Henri, Kurtis, Danny and Ilia.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors