Spaces:
Sleeping
Sleeping
from fastapi import FastAPI | |
from pydantic import BaseModel | |
app = FastAPI() | |
class UserData(BaseModel): | |
weight: float | |
height: float | |
age: int | |
body_type: str | |
goals: str | |
preferences: str | |
def generate_plan(data: UserData): | |
# Lógica para gerar o plano de treino personalizado | |
plan = f"Generated plan for {data.body_type} body type with goals: {data.goals} and preferences: {data.preferences}" | |
return {"plan": plan} |