TheTallGuy commited on
Commit
547173f
·
verified ·
1 Parent(s): a00ed68

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -6
app.py CHANGED
@@ -1,7 +1,25 @@
1
  import gradio as gr
2
-
3
- def greet(name):
4
- return "Hello " + name + "!!"
5
-
6
- demo = gr.Interface(fn=greet, inputs="text", outputs="text")
7
- demo.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
+ exercise = {
3
+ "Back": "Pull-Ups,Bent-Over Rows,Lat Pulldowns,Deadlifts,Single-Arm Dumbbell Rows",
4
+ "Bicep": "Bicep Curls,Hammer Curls,Concentration Curls,Barbell Curls,Preacher Curls",
5
+ "Chest": "Bench Press,Incline Dumbbell Press,Push-Ups,Chest Flyes,Dips",
6
+ "Tricep": "Tricep Dips,Tricep Pushdowns,Overhead Tricep Extension,Skull CrushersClose-Grip Bench Press",
7
+ "Legs": "Squats,Leg Press,Lunges,Romanian Deadlifts,Leg Curls and Leg Extensions",
8
+ "Shoulder": "Overhead Press,Lateral Raises,Front Raises,Rear Delt Flyes,Arnold Press",
9
+ "Abs": "Crunches,Leg Raises,Planks,Russian Twists,Bicycle Crunches"
10
+ }
11
+ def get_ex(option):
12
+ return exercise.get(option, "Invalid option. Please select a number between given choices.")
13
+ ui = gr.Interface(
14
+ fn=get_ex,
15
+ theme="soft",
16
+ inputs=gr.Dropdown(
17
+ choices=["Back", "Bicep", "Legs", "Chest","Shoulder","Tricep","Abs"],
18
+ label="Select body part to train",
19
+ type="value"
20
+ ),
21
+ outputs="text",
22
+ title="Gym Bot",
23
+ description="Select an option from the dropdown to get the exercises."
24
+ )
25
+ ui.launch()