Spaces:
Sleeping
Sleeping
| from fastapi import FastAPI, APIRouter | |
| from fastapi.middleware.cors import CORSMiddleware | |
| from src.apis.routers.gen_script import router as gen_script_router | |
| from src.apis.routers.auth_router import router as auth_router | |
| from src.apis.routers.prompt_editor import router as prompt_editor_router | |
| api_router = APIRouter() | |
| api_router.include_router(gen_script_router) | |
| api_router.include_router(auth_router) | |
| api_router.include_router(prompt_editor_router) | |
| def create_app(): | |
| app = FastAPI( | |
| docs_url="/", | |
| title="AI Service ABAOXOMTIEU", | |
| ) | |
| app.add_middleware( | |
| CORSMiddleware, | |
| allow_origins=["*"], | |
| allow_credentials=True, | |
| allow_methods=["*"], | |
| allow_headers=["*"], | |
| ) | |
| return app | |