Spaces:
Sleeping
Sleeping
File size: 1,489 Bytes
954a8ef |
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 27 28 29 30 31 32 33 34 35 |
from smolagents import Tool
from typing import Any, Optional
class SimpleTool(Tool):
name = "suggest_exercise"
description = "Suggests workout based on days."
inputs = {"day":{"type":"string","description":"The day refers to which body part we are dealing with; example: Chest day, Leg day..."}}
output_type = "string"
def forward(self, day: str) -> str:
"""
Suggests workout based on days.
Args:
day: The day refers to which body part we are dealing with; example: Chest day, Leg day...
"""
if day == "chest":
return "Bench press, Inclined press, Chest Flyes."
elif day == "triceps":
return "Tricep Dips, Skull Crushers, Tricep Pushdowns."
elif day == "legs":
return "Squats, Leg Press, Lunges, Leg Curls."
elif day == "back":
return "Deadlifts, Pull-ups, Bent-over Rows, Lat Pulldowns."
elif day == "shoulders":
return "Overhead Press, Lateral Raises, Front Raises, Shrugs."
elif day == "biceps":
return "Barbell Curls, Hammer Curls, Concentration Curls."
elif day == "abs":
return "Crunches, Leg Raises, Planks, Bicycle Crunches."
elif day == "cardio":
return "Running, Cycling, Jump Rope, Swimming."
elif day == "full body":
return "Squats, Deadlifts, Push-ups, Pull-ups, Lunges."
else:
return "Custom from the trainer" |