Spaces:
Sleeping
Sleeping
| 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) | |
| def root(): | |
| return {"message": "Welcome to the ML Prediction API. Visit /docs for documentation."} | |