srbhavya01 commited on
Commit
27e5aad
·
verified ·
1 Parent(s): 9465039

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +28 -18
app.py CHANGED
@@ -4,7 +4,6 @@ import streamlit as st
4
  from model_api import query_model
5
  from prompt_builder import build_prompt, calculate_bmi, bmi_category
6
 
7
-
8
  # ---------- STREAMLIT UI ----------
9
  st.title("🏋️ AI Personalized 5-Day Workout Planner")
10
 
@@ -15,32 +14,43 @@ gender = st.selectbox("Gender", ["Male", "Female", "Other"])
15
  height = st.number_input("Height (cm)", min_value=0, max_value=250)
16
  weight = st.number_input("Weight (kg)", min_value=0, max_value=200)
17
 
18
- goal = st.selectbox("Fitness Goal",["Build Muscle", "Weight Loss", "Strength Gain", "Abs Building", "Flexible"])
 
 
 
19
 
20
- fitness_level = st.selectbox("Fitness Level", [
21
- "Beginner",
22
- "Intermediate",
23
- "Advanced"
24
- ])
25
 
26
  equipment = st.multiselect(
27
  "Available Equipment",
28
- ["Dumbbells", "Resistance Band", "Yoga Mat", "Skipping Rope",
29
- "Weight Plates", "Cycling", "Inclined Bench", "Pullups Bar", "No Equipment"]
 
 
 
 
 
 
 
 
 
30
  )
31
 
32
  # ---------- GENERATE PLAN ----------
33
  if st.button("Generate 5-Day Plan 💪"):
34
 
35
- prompt, bmi, bmi_status = build_prompt(
36
- name,
37
- gender,
38
- height,
39
- weight,
40
- goal,
41
- fitness_level,
42
- equipment
43
- )
44
 
45
  st.subheader(f"Your BMI: {bmi:.2f} ({bmi_status})")
46
 
 
4
  from model_api import query_model
5
  from prompt_builder import build_prompt, calculate_bmi, bmi_category
6
 
 
7
  # ---------- STREAMLIT UI ----------
8
  st.title("🏋️ AI Personalized 5-Day Workout Planner")
9
 
 
14
  height = st.number_input("Height (cm)", min_value=0, max_value=250)
15
  weight = st.number_input("Weight (kg)", min_value=0, max_value=200)
16
 
17
+ goal = st.selectbox(
18
+ "Fitness Goal",
19
+ ["Build Muscle", "Weight Loss", "Strength Gain", "Abs Building", "Flexible"]
20
+ )
21
 
22
+ fitness_level = st.selectbox(
23
+ "Fitness Level",
24
+ ["Beginner", "Intermediate", "Advanced"]
25
+ )
 
26
 
27
  equipment = st.multiselect(
28
  "Available Equipment",
29
+ [
30
+ "Dumbbells",
31
+ "Resistance Band",
32
+ "Yoga Mat",
33
+ "Skipping Rope",
34
+ "Weight Plates",
35
+ "Cycling",
36
+ "Inclined Bench",
37
+ "Pullups Bar",
38
+ "No Equipment"
39
+ ]
40
  )
41
 
42
  # ---------- GENERATE PLAN ----------
43
  if st.button("Generate 5-Day Plan 💪"):
44
 
45
+ prompt, bmi, bmi_status = build_prompt(
46
+ name,
47
+ gender,
48
+ height,
49
+ weight,
50
+ goal,
51
+ fitness_level,
52
+ equipment
53
+ )
54
 
55
  st.subheader(f"Your BMI: {bmi:.2f} ({bmi_status})")
56