|
from fastapi import FastAPI |
|
import IA |
|
|
|
app = FastAPI() |
|
|
|
|
|
@app.post("/macronutrientes/") |
|
async def macronutrientes(prompt: str): |
|
return IA.getMacronutrientes(prompt) |
|
|
|
|
|
@app.post("/comidas/") |
|
async def comidas(prompt: str): |
|
return IA.getComidas(prompt) |
|
|
|
|
|
@app.post("/lista_alimentos/") |
|
async def lista_alimentos(prompt: str): |
|
return IA.getAlimentos(prompt) |
|
|
|
|
|
@app.post("/receta/") |
|
async def receta(prompt: str): |
|
return IA.getReceta(prompt) |
|
|
|
|
|
@app.post("/sustituir_alimento/") |
|
async def sustituir_alimento(prompt: str): |
|
return IA.getSustitucion(prompt) |