from fastapi import APIRouter from pathlib import Path from starlette.responses import FileResponse router = APIRouter(tags=["root"]) @router.get("/") async def root(): """Главная страница""" static_dir = Path(__file__).parent.parent / "api/static" index_path = static_dir / "index.html" if index_path.exists(): return FileResponse(str(index_path)) else: return { "service": "Bone Quality Assessment API", "version": "1.0.0", "docs": "/docs", "health": "/api/v1/health", "analyze": "/api/v1/analyze (POST)" }