Download src/models/error.py from asmaakbar/web-app: direct link, hf CLI and curl.
- Browser
- Download file 451 Bytes
-
https://huggingface.co/spaces/asmaakbar/web-app/resolve/main/src/models/error.py
- Command line
-
hf download hf://spaces/asmaakbar/web-app/src/models/error.py
-
curl -L -o error.py https://huggingface.co/spaces/asmaakbar/web-app/resolve/main/src/models/error.py
451 Bytes
| from typing import Optional | |
| from pydantic import BaseModel | |
| class ErrorDetail(BaseModel): | |
| """Model for error details in API responses.""" | |
| code: str | |
| message: str | |
| class ErrorResponse(BaseModel): | |
| """Model for error responses from the API.""" | |
| success: bool = False | |
| error: ErrorDetail | |
| class SuccessResponse(BaseModel): | |
| """Model for success responses from the API.""" | |
| success: bool = True | |
| data: Optional[dict] = None |