fix: refact logic
This commit is contained in:
@@ -15,7 +15,7 @@ settings = get_settings()
|
||||
async def lifespan(app: FastAPI):
|
||||
"""Application lifespan handler for startup/shutdown."""
|
||||
# Startup: Load models
|
||||
init_layout_detector(model_path=settings.doclayout_model_path)
|
||||
init_layout_detector()
|
||||
|
||||
yield
|
||||
|
||||
@@ -37,3 +37,9 @@ app.include_router(api_router, prefix=settings.api_prefix)
|
||||
async def health_check():
|
||||
"""Health check endpoint."""
|
||||
return {"status": "healthy"}
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import uvicorn
|
||||
uvicorn.run(app, host="0.0.0.0", port=8053)
|
||||
Reference in New Issue
Block a user