from fastapi import FastAPI, Body #from llm.model import predict app = FastAPI() @app.post("/index") async def make_prediction(data: dict = Body(...)): # Get user input from the request body user_input = data["input"] # Call the LLM model for prediction output = predict(user_input) # Return the prediction as JSON return {"output": output}