File size: 588 Bytes
48c8b68
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from fastapi import FastAPI
from app.routers import prediction
from app.core.database import engine, Base

# Create tables on startup (for simplicity in this POC, though usually done via migration scripts)
# Base.metadata.create_all(bind=engine) 
# We will use a separate script for DB creation as requested.

app = FastAPI(
    title="ML Prediction API",
    description="API for XGBoost Model Predictions",
    version="1.0.0"
)

app.include_router(prediction.router)

@app.get("/")
def root():
    return {"message": "Welcome to the ML Prediction API. Visit /docs for documentation."}