from fastapi import FastAPI import infer app = FastAPI() @app.post("/predict") async def predict(text: str): return {"prediction": infer.predict(text)}