修改适配Linux

This commit is contained in:
wzy-warehouse
2026-06-24 13:03:15 +08:00
parent cd638d9a5c
commit e5582bab5d
3 changed files with 41 additions and 28 deletions
+1 -8
View File
@@ -6,8 +6,7 @@ from contextlib import asynccontextmanager
from fastapi import FastAPI, Request
from app.utils.api_deps import get_rainfall_model, get_earthquake_model, is_model_loaded
from app.schemas.api_schemas import HealthResponse
from app.utils.api_deps import get_rainfall_model, get_earthquake_model
from app.config.paths import get_logger
from config import settings
@@ -64,10 +63,4 @@ def create_app() -> FastAPI:
from app.api import register_routers
register_routers(application)
@application.get("/health", response_model=HealthResponse, tags=["系统"])
async def health_check():
"""健康检查"""
status = is_model_loaded()
return HealthResponse(status="ok", **status)
return application