Rahaf2001 commited on
Commit
1dac02d
·
verified ·
1 Parent(s): 4c4371c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -291,7 +291,7 @@ banner = gr.HTML(
291
 
292
  # ... your Tabs ...
293
 
294
-
295
  with gr.Tab("BMI & TDEE"):
296
  with gr.Row():
297
  with gr.Column():
@@ -311,7 +311,8 @@ banner = gr.HTML(
311
  level = gr.Radio(["Beginner","Intermediate"], value="Beginner", label="Level")
312
  days = gr.Slider(2, 6, value=4, step=1, label="Days/week")
313
  goal_w = gr.Radio(["Lose fat","Maintain","Build muscle"], value="Build muscle", label="Goal")
314
- equipment = gr.Dropdown(["Gym (machines/dumbbells)","Home (bands/db)","Bodyweight only"], value="Gym (machines/dumbbells)", label="Equipment")
 
315
  btn2 = gr.Button("Generate Plan")
316
  out2 = gr.Markdown()
317
  btn2.click(agent_workout, [level, days, goal_w, equipment], out2)
@@ -321,7 +322,8 @@ banner = gr.HTML(
321
  with gr.Column():
322
  target_kcal = gr.Number(value=1900, label="Target calories (kcal)")
323
  weight_n = gr.Number(value=60, label="Weight (kg)")
324
- liked = gr.Textbox(label="Preferred foods (comma-separated)", placeholder="chicken, eggs, rice, oats, salad, laban")
 
325
  avoid = gr.Textbox(label="Allergies / avoid (comma-separated)", placeholder="nuts, shrimp, gluten")
326
  meals = gr.Slider(2, 6, value=3, step=1, label="Meals/day")
327
  btn3 = gr.Button("Build Meal Plan")
@@ -331,18 +333,16 @@ banner = gr.HTML(
331
  with gr.Tab("All-in-One Coach"):
332
  with gr.Row():
333
  with gr.Column():
334
- # Personal
335
  sex2 = gr.Radio(["male","female"], value="female", label="Sex")
336
  age2 = gr.Slider(15, 70, value=24, step=1, label="Age")
337
  height2 = gr.Slider(130, 210, value=165, step=1, label="Height (cm)")
338
  weight2 = gr.Slider(35, 160, value=60, step=0.5, label="Weight (kg)")
339
  activity2 = gr.Dropdown(list(ACTIVITY.keys()), value="Light (1-3x/wk)", label="Activity")
340
  goal2 = gr.Radio(["Lose fat","Maintain","Build muscle"], value="Build muscle", label="Goal")
341
- # Training
342
  level2 = gr.Radio(["Beginner","Intermediate"], value="Beginner", label="Level")
343
  days2 = gr.Slider(2, 6, value=4, step=1, label="Days/week")
344
- equipment2 = gr.Dropdown(["Gym (machines/dumbbells)","Home (bands/db)","Bodyweight only"], value="Gym (machines/dumbbells)", label="Equipment")
345
- # Nutrition
346
  liked2 = gr.Textbox(label="Preferred foods", placeholder="chicken, eggs, rice, potatoes")
347
  avoid2 = gr.Textbox(label="Allergies / avoid", placeholder="nuts, shrimp")
348
  meals2 = gr.Slider(2, 6, value=3, step=1, label="Meals/day")
 
291
 
292
  # ... your Tabs ...
293
 
294
+ with gr.Tabs():
295
  with gr.Tab("BMI & TDEE"):
296
  with gr.Row():
297
  with gr.Column():
 
311
  level = gr.Radio(["Beginner","Intermediate"], value="Beginner", label="Level")
312
  days = gr.Slider(2, 6, value=4, step=1, label="Days/week")
313
  goal_w = gr.Radio(["Lose fat","Maintain","Build muscle"], value="Build muscle", label="Goal")
314
+ equipment = gr.Dropdown(["Gym (machines/dumbbells)","Home (bands/db)","Bodyweight only"],
315
+ value="Gym (machines/dumbbells)", label="Equipment")
316
  btn2 = gr.Button("Generate Plan")
317
  out2 = gr.Markdown()
318
  btn2.click(agent_workout, [level, days, goal_w, equipment], out2)
 
322
  with gr.Column():
323
  target_kcal = gr.Number(value=1900, label="Target calories (kcal)")
324
  weight_n = gr.Number(value=60, label="Weight (kg)")
325
+ liked = gr.Textbox(label="Preferred foods (comma-separated)",
326
+ placeholder="chicken, eggs, rice, oats, salad, laban")
327
  avoid = gr.Textbox(label="Allergies / avoid (comma-separated)", placeholder="nuts, shrimp, gluten")
328
  meals = gr.Slider(2, 6, value=3, step=1, label="Meals/day")
329
  btn3 = gr.Button("Build Meal Plan")
 
333
  with gr.Tab("All-in-One Coach"):
334
  with gr.Row():
335
  with gr.Column():
 
336
  sex2 = gr.Radio(["male","female"], value="female", label="Sex")
337
  age2 = gr.Slider(15, 70, value=24, step=1, label="Age")
338
  height2 = gr.Slider(130, 210, value=165, step=1, label="Height (cm)")
339
  weight2 = gr.Slider(35, 160, value=60, step=0.5, label="Weight (kg)")
340
  activity2 = gr.Dropdown(list(ACTIVITY.keys()), value="Light (1-3x/wk)", label="Activity")
341
  goal2 = gr.Radio(["Lose fat","Maintain","Build muscle"], value="Build muscle", label="Goal")
 
342
  level2 = gr.Radio(["Beginner","Intermediate"], value="Beginner", label="Level")
343
  days2 = gr.Slider(2, 6, value=4, step=1, label="Days/week")
344
+ equipment2 = gr.Dropdown(["Gym (machines/dumbbells)","Home (bands/db)","Bodyweight only"],
345
+ value="Gym (machines/dumbbells)", label="Equipment")
346
  liked2 = gr.Textbox(label="Preferred foods", placeholder="chicken, eggs, rice, potatoes")
347
  avoid2 = gr.Textbox(label="Allergies / avoid", placeholder="nuts, shrimp")
348
  meals2 = gr.Slider(2, 6, value=3, step=1, label="Meals/day")