21 lines
491 B
Python
21 lines
491 B
Python
from fastapi import FastAPI
|
|
from fastapi.middleware.cors import CORSMiddleware
|
|
from app.routers import predictions
|
|
|
|
app = FastAPI(
|
|
title="Housing Price Predictor API",
|
|
description="API for predicting housing prices",
|
|
version="1.0.0"
|
|
)
|
|
|
|
# Add CORS middleware
|
|
app.add_middleware(
|
|
CORSMiddleware,
|
|
allow_origins=["*"],
|
|
allow_credentials=True,
|
|
allow_methods=["*"],
|
|
allow_headers=["*"],
|
|
)
|
|
|
|
# Include routers
|
|
app.include_router(predictions.router, prefix="/api/v1") |