This is a web-based application built in Python using the Gradio library to help you monitor your daily blood pressure readings. It provides historical data in both table and graph form and includes a medical search feature powered by an LLM.
Features
Input Blood Pressure Observations: Easily enter your daily systolic, diastolic, and heart rate measurements.
View Historical Data: See all your past observations in a clear, scrollable table.
Visualize Trends: Generate a line chart showing the daily averages of your systolic and diastolic levels over time.
Data Tables: Create and view tables of your data, with options to see:
All individual observations.
Only the daily averages.
All observations alongside the calculated average for that day.
Export Data:
Save the blood pressure chart as a PNG image file.
Export data tables to a PDF document.
AI Health Advisor: Ask questions about blood pressure and get summary information from an OpenAI-powered assistant.
Technologies Used
Python
Gradio
Pandas
Plotnine
OpenAI
python-dotenv
FPDF
Setup and Installation
Prerequisites: Ensure you have Python installed on your system.
Environment Variables: Create a file named .env in the blood_pressure_app directory. Inside this file, add your OpenAI API key like this:
OPENAI_API_KEY='your_openai_api_key_here'
Install Dependencies: Open a terminal or command prompt, navigate to the blood_pressure_app directory, and run the following command to install the required Python libraries:
pip install -r requirements.txt
How to Run the Application
Navigate to the blood_pressure_app directory in your terminal.
Run the following command:
python app.py
The application will start, and you will see a local URL in the terminal (e.g., http://127.0.0.1:7860). Open this URL in your web browser to use the application.