Download app/api/pages/admin.py from f2d90b38/ggload: direct link, hf CLI and curl.
- Browser
- Download file 895 Bytes
-
https://huggingface.co/spaces/f2d90b38/ggload/resolve/main/app/api/pages/admin.py
- Command line
-
hf download hf://spaces/f2d90b38/ggload/app/api/pages/admin.py
-
curl -L -o admin.py https://huggingface.co/spaces/f2d90b38/ggload/resolve/main/app/api/pages/admin.py
895 Bytes
| from pathlib import Path | |
| from fastapi import APIRouter | |
| from fastapi.responses import FileResponse, RedirectResponse | |
| router = APIRouter() | |
| STATIC_DIR = Path(__file__).resolve().parents[2] / "static" | |
| async def admin_root(): | |
| return RedirectResponse(url="/admin/login") | |
| async def admin_login(): | |
| return FileResponse(STATIC_DIR / "admin/pages/login.html") | |
| async def admin_config(): | |
| return FileResponse(STATIC_DIR / "admin/pages/config.html") | |
| async def admin_cache(): | |
| return FileResponse(STATIC_DIR / "admin/pages/cache.html") | |
| async def admin_token(): | |
| return FileResponse(STATIC_DIR / "admin/pages/token.html") | |