File size: 724 Bytes
3150072 |
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 |
from fastapi import FastAPI
import IA
app = FastAPI()
#1.- Obtener distribución macronutrientes.
@app.post("/macronutrientes/")
async def macronutrientes(prompt: str):
return IA.getMacronutrientes(prompt)
#2.- Obtener distribución comidas.
@app.post("/comidas/")
async def comidas(prompt: str):
return IA.getComidas(prompt)
#3.- Obtener lista alimentos.
@app.post("/lista_alimentos/")
async def lista_alimentos(prompt: str):
return IA.getAlimentos(prompt)
#4.- Obtener receta.
@app.post("/receta/")
async def receta(prompt: str):
return IA.getReceta(prompt)
#5.- Sustituir alimento.
@app.post("/sustituir_alimento/")
async def sustituir_alimento(prompt: str):
return IA.getSustitucion(prompt) |