Spaces:
Sleeping
Sleeping
Download models/export_models.py from Coeinterns/bank-statement-api: direct link, hf CLI and curl.
- Browser
- Download file 787 Bytes
-
https://huggingface.co/spaces/Coeinterns/bank-statement-api/resolve/main/models/export_models.py
- Command line
-
hf download hf://spaces/Coeinterns/bank-statement-api/models/export_models.py
-
curl -L -o export_models.py https://huggingface.co/spaces/Coeinterns/bank-statement-api/resolve/main/models/export_models.py
787 Bytes
| from typing import Optional | |
| from pydantic import BaseModel | |
| class ExportRequest(BaseModel): | |
| format: str # "xlsx" | "csv" | "pdf_audit" | "xlsx_report" | |
| class ExportResponse(BaseModel): | |
| downloadUrl: Optional[str] = None | |
| blob: Optional[str] = None # base64 | |
| fileName: Optional[str] = None | |
| class ExportSummary(BaseModel): | |
| statementId: str | |
| fileName: str | |
| totalRows: int | |
| correctedRows: int | |
| deletedRows: int | |
| accuracy: float | |
| exportedAt: Optional[str] = None | |
| unverifiedCount: int = 0 | |
| monthsAvailable: int = 0 # total distinct calendar months in uploaded data | |
| monthsUsedForAverage: int = 3 # always 3; tells the UI what divisor was used | |
| monthRangeLabel: str = "" # human-readable period e.g. "February 2026 – April 2026" | |