samith-a's picture
Create app.py
b10f07b verified
raw
history blame
312 Bytes
# app.py
from fastapi import FastAPI
app = FastAPI()
@app.on_event("startup")
def on_startup():
print("✅ Space is live!")
@app.get("/ping")
def ping():
return {"ping": "pong"}
@app.post("/predict")
def predict(payload: dict):
# Echo back whatever JSON you send
return {"received": payload}