Spaces:
Running on T4
Running on T4
Download backend/app/modules/catalog/controller.py from modventures/baseball-engine: direct link, hf CLI and curl.
- Browser
- Download file 543 Bytes
-
https://huggingface.co/spaces/modventures/baseball-engine/resolve/main/backend/app/modules/catalog/controller.py
- Command line
-
hf download hf://spaces/modventures/baseball-engine/backend/app/modules/catalog/controller.py
-
curl -L -o controller.py https://huggingface.co/spaces/modventures/baseball-engine/resolve/main/backend/app/modules/catalog/controller.py
543 Bytes
| """D6: GET /v1/catalog/metrics?mode=h|p.""" | |
| from typing import Annotated, Literal | |
| from fastapi import APIRouter, Query | |
| from app.core.dependencies import CurrentAccount | |
| from app.modules.catalog.schemas import CatalogOut | |
| from app.modules.catalog.service import CatalogService | |
| router = APIRouter(prefix="/v1", tags=["catalog"]) | |
| async def catalog_metrics(_: CurrentAccount, mode: Annotated[Literal["h", "p"], Query()] = "h") -> CatalogOut: | |
| return CatalogService().metrics(mode) | |