Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,25 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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()
|