from fastapi import FastAPI import uvicorn app = FastAPI() @app.get("/") def home(): return {"message": "Backend is running"} @app.post("/v1/predict") def predict(data: dict): weight = data.get("weight") mpg = data.get("mpg") # dummy prediction (we will replace later) result = weight + mpg return {"prediction": result}