File size: 869 Bytes
1f6d7ba
90cc0e2
 
1f6d7ba
b8f77e5
1f6d7ba
90cc0e2
8dedb65
90cc0e2
 
 
17b2277
90cc0e2
 
8dedb65
90cc0e2
 
17b2277
90cc0e2
17b2277
90cc0e2
 
 
17b2277
90cc0e2
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import streamlit as st
from prompt_builder import build_prompt
from model_api import query_model

st.set_page_config(page_title="FitPlan AI", layout="centered")

st.title("🏋️ FitPlan AI - Personalized Workout Generator")

# User Inputs
goal = st.selectbox("Select Your Goal", 
                    ["Build Muscle", "Lose Weight", "Improve Endurance"])

fitness_level = st.selectbox("Fitness Level", 
                             ["Beginner", "Intermediate", "Advanced"])

equipment = st.selectbox("Available Equipment",
                         ["No Equipment", "Dumbbells", "Full Gym"])

if st.button("Generate Plan"):

    with st.spinner("Generating your personalized workout plan..."):
        prompt = build_prompt(goal, fitness_level, equipment)
        response = query_model(prompt)

    st.subheader("Your Personalized Workout Plan")
    st.write(response)