Spaces:
Sleeping
Sleeping
Download models/layout.py from Coeinterns/bank-statement-api: direct link, hf CLI and curl.
- Browser
- Download file 675 Bytes
-
https://huggingface.co/spaces/Coeinterns/bank-statement-api/resolve/main/models/layout.py
- Command line
-
hf download hf://spaces/Coeinterns/bank-statement-api/models/layout.py
-
curl -L -o layout.py https://huggingface.co/spaces/Coeinterns/bank-statement-api/resolve/main/models/layout.py
675 Bytes
| from typing import Optional, List | |
| from pydantic import BaseModel | |
| class ColumnLayoutModel(BaseModel): | |
| name: str | |
| header_label: str | |
| x_min: float | |
| x_max: float | |
| col_type: str | |
| confidence: float = 1.0 | |
| class HeaderDetectionResultModel(BaseModel): | |
| found: bool | |
| page_num: int | |
| columns: List[ColumnLayoutModel] | |
| confidence: float | |
| page_width: Optional[float] = None | |
| page_height: Optional[float] = None | |
| class VerifyLayoutPayloadModel(BaseModel): | |
| columns: List[ColumnLayoutModel] | |
| header_page: int | |
| header_y: Optional[float] = None | |
| class ColumnUpdatePayloadModel(BaseModel): | |
| x_min: float | |
| x_max: float | |
| header_label: str | |