Spaces:
Sleeping
Sleeping
Download models.py from akashrajeev/decodx: direct link, hf CLI and curl.
- Browser
- Download file 462 Bytes
-
https://huggingface.co/spaces/akashrajeev/decodx/resolve/main/models.py
- Command line
-
hf download hf://spaces/akashrajeev/decodx/models.py
-
curl -L -o models.py https://huggingface.co/spaces/akashrajeev/decodx/resolve/main/models.py
462 Bytes
| from pydantic import BaseModel | |
| from typing import List, Optional | |
| class Req(BaseModel): | |
| documents: str | |
| questions: List[str] | |
| ocr_method: Optional[str] = "auto" # NEW: OCR method selection | |
| class ImageReq(BaseModel): | |
| """NEW: Request model for direct image upload""" | |
| questions: List[str] | |
| ocr_method: Optional[str] = "auto" | |
| class Resp(BaseModel): | |
| answers: List[str] | |
| processing_info: Optional[dict] = None # NEW: Processing metadata |