Skip to content

Repository files navigation

SymptomSense

AI-powered symptom information platform built with Flask and the Gemini API.

SymptomSense is a modern web application that helps users organize and understand their symptoms through AI-generated general health information.

Users can enter their age, symptoms, symptom duration, severity, and additional details. The Flask backend securely processes the information and sends it to Google's Gemini API. The resulting response is presented in a structured and easy-to-understand format.

SymptomSense is designed as an informational tool and does not provide medical diagnoses or replace professional medical care.

Screenshots

Home Page

SymptomSense Home Page

System Architecture

SymptomSense System Architecture

Data Flow Diagram

SymptomSense Data Flow Diagram

Features

  • AI-powered symptom information
  • Age and symptom input
  • Symptom duration selection
  • Symptom severity selection
  • Additional symptom details
  • Client-side form validation
  • Server-side input validation
  • Structured AI-generated responses
  • Possible causes and conditions
  • General health information
  • Recommended next steps
  • Self-care suggestions
  • Warning signs and when to seek medical care
  • Emergency safety notice
  • Medical disclaimer
  • Loading state during AI analysis
  • Duplicate submission prevention
  • Friendly error handling
  • Responsive design for desktop, tablet, and mobile
  • Modern healthcare-focused UI
  • Secure API-key handling through environment variables
  • No database required
  • No user account or login system
  • No persistent user data storage
  • Single reusable favicon/logo across the application

How It Works

The application follows a simple request flow:

  1. The user opens the Symptom Checker.
  2. The user provides their age and symptom information.
  3. JavaScript performs client-side validation.
  4. The form is submitted to the Flask backend.
  5. Flask performs server-side validation.
  6. The backend sends the validated information to Gemini.
  7. Gemini generates structured general health information.
  8. Flask processes the response.
  9. The results are displayed in a dedicated results interface.
  10. The user can review the information or start another assessment.

The Gemini API key is never exposed to the browser.

AI Response

SymptomSense organizes AI-generated information into the following sections:

  • Symptom Summary
  • Possible Causes / Conditions
  • General Information
  • Recommended Next Steps
  • Self-Care Suggestions
  • Warning Signs / When to Seek Medical Care

Possible causes are presented as possibilities and not as confirmed diagnoses.

Safety First

SymptomSense is designed with a safety-focused approach.

The AI instructions are designed to:

  • Provide general health information.
  • Avoid claiming to diagnose users.
  • Distinguish possible explanations from confirmed conditions.
  • Highlight potentially serious warning signs.
  • Recommend professional medical evaluation when appropriate.
  • Avoid unnecessary alarm.
  • Avoid unsafe treatment instructions.
  • Encourage users to seek immediate professional care when an emergency may be occurring.

Medical Disclaimer

SymptomSense is for general informational purposes only.

The information generated by the application is not a medical diagnosis, medical advice, or a treatment recommendation.

Symptoms can have many possible causes, and an AI-generated response cannot replace an evaluation by a qualified healthcare professional.

Always consult a qualified healthcare professional for personalized medical advice, diagnosis, or treatment.

If you believe you are experiencing a medical emergency, do not rely on SymptomSense. Seek immediate professional medical care or contact your local emergency medical service.

Technology Stack

Frontend

  • HTML5
  • CSS3
  • JavaScript

Backend

  • Python
  • Flask

AI

  • Google Gemini API
  • Google GenAI Python SDK

Configuration

  • Python python-dotenv
  • Environment variables

Validation / Structured Data

  • Pydantic

Requirements

Before running SymptomSense, make sure you have:

  • Python 3.10 or newer
  • pip
  • Git
  • A Gemini API key
  • A Windows, macOS, or Linux environment

About

AI-powered symptom information web application built with Flask, Python, JavaScript, and Google Gemini API.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages