Spaces:
Sleeping
Sleeping
File size: 475 Bytes
e9d0729 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
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
@app.post("/generate_plan")
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} |