test / README.md
Ewan
Replace chatbot with Ketone Level Plotter app
bc1f545

A newer version of the Gradio SDK is available: 6.3.0

Upgrade
metadata
title: Ketone Level Plotter
emoji: πŸ”¬
colorFrom: red
colorTo: pink
sdk: gradio
app_file: app.py
pinned: false

πŸ”¬ Ketone Level Plotter

A simple and elegant tool to visualize ketone levels over time from CSV or Excel files.

Features

  • πŸ“Š Interactive Plotting: Upload CSV or Excel files and get beautiful time-series plots
  • 🎯 Smart Column Detection: Automatically identifies date and ketone level columns
  • πŸ“ˆ Summary Statistics: Get min, max, average, and date range statistics
  • πŸ“ Multiple Formats: Supports CSV (.csv) and Excel (.xlsx, .xls) files
  • 🎨 Clean Design: Modern, easy-to-use interface with Gradio

How to Use

  1. Prepare your data file with:

    • A date/time column (any common format like YYYY-MM-DD, MM/DD/YYYY, etc.)
    • A ketone level column (numeric values in mmol/L)
  2. Upload your file by dragging and dropping or clicking to browse

  3. Click "Generate Plot" or the plot will auto-generate after upload

  4. View your results including the plot and summary statistics

Expected File Format

Your file should have at least two columns:

  • Date/Time column: Can be named "Date", "Time", or any variant
  • Ketone level column: Can be named "Ketone", "Level", "Value", "Reading", "Sensor", etc.

If column names don't match, the app will use:

  • First column as date/time
  • Second column as ketone levels

Running Locally

pip install -r requirements.txt
python app.py

Example Data Structure

Date,Ketone Level
2025-10-27 12:00:00,1.3
2025-10-27 13:00:00,1.5
2025-10-27 14:00:00,1.8

Or in Excel format with similar structure.

Technologies

  • Gradio: Interactive web interface
  • Pandas: Data processing
  • Matplotlib: Plotting and visualization
  • OpenPyXL: Excel file support