Spaces:
Runtime error
Runtime error
Download app/schemas/document.py from BuildersAI/buildersai: direct link, hf CLI and curl.
- Browser
- Download file 580 Bytes
-
https://huggingface.co/spaces/BuildersAI/buildersai/resolve/main/app/schemas/document.py
- Command line
-
hf download hf://spaces/BuildersAI/buildersai/app/schemas/document.py
-
curl -L -o document.py https://huggingface.co/spaces/BuildersAI/buildersai/resolve/main/app/schemas/document.py
580 Bytes
| from pydantic import BaseModel | |
| from typing import Optional | |
| from datetime import datetime | |
| class DocumentUpload(BaseModel): | |
| """Schema for document upload.""" | |
| filename: str | |
| class DocumentResponse(BaseModel): | |
| """Schema for document response.""" | |
| id: str | |
| user_id: str | |
| filename: str | |
| file_type: Optional[str] | |
| file_size: Optional[int] | |
| created_at: datetime | |
| class Config: | |
| from_attributes = True | |
| class DocumentListResponse(BaseModel): | |
| """Schema for document list response.""" | |
| documents: list[DocumentResponse] | |
| total: int | |