Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💪 AI Gym Planner

An AI-powered workout planner built with Python, Streamlit, and the OpenAI API.

The application generates personalized workouts based on a user's height, weight, age, gym experience, fitness goal, workout duration, and selected muscle group. Rather than allowing the AI to invent exercises, it first filters a curated exercise database and then asks the AI to create a structured workout using only those exercises.

Features

  • Personalized AI-generated workout plans
  • Experience-based exercise selection
  • Goal-specific training (Muscle Gain, Fat Loss, Strength, Endurance)
  • Muscle group selection
  • Adjustable workout duration
  • Curated exercise database
  • Structured AI outputs using Pydantic
  • Clean Streamlit interface

Tech Stack

  • Python 3.12+
  • Streamlit
  • OpenAI API
  • Pydantic
  • python-dotenv
  • JSON exercise database
  • uv

Getting Started

Clone the repository:

git clone https://github.com/your-username/gym-ai-planner.git
cd gym-ai-planner

Install dependencies:

uv sync

Create a .env file in the project root:

OPENAI_API_KEY=your_openai_api_key

Run the application:

uv run streamlit run app.py

How It Works

  1. Enter your height, weight, age, gym experience, goal, workout duration, and today's workout.

  2. The app filters a curated exercise database for relevant exercises.

  3. The filtered exercises and user profile are sent to the AI.

  4. The AI returns a structured workout plan containing:

    • Warm-up
    • Exercises
    • Sets
    • Repetitions
    • Rest periods
    • Cool-down
  5. The workout is displayed in the Streamlit interface.

License

This project is licensed under the MIT License.

About

AI-powered workout planner built with Python, Streamlit, and OpenAI. Generates personalized gym workouts using a curated exercise database and structured AI responses.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages