AsyncCoder-10's picture
Upload 24 files
cd05673 verified
Raw History Blame Contribute Delete
652 Bytes
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from app.api.v1.endpoints.moderation import router as moderation_router
app = FastAPI(
title="Dynamic Moderation API",
description="Moderates text and generates dynamic safe alternatives using AI.",
version="1.0.0",
)
app.add_middleware(
CORSMiddleware,
allow_origins=["*"], # Change to your frontend URL in production
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
app.include_router(moderation_router, prefix="/api/v1")
@app.get("/health")
def health_check():
return {"status": "ok"}