Spaces:
Runtime error
Runtime error
File size: 727 Bytes
2eafbc4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
from typing import Optional
from pydantic import BaseModel, Field
class DoctrOCRInferenceResponse(BaseModel):
"""
DocTR Inference response.
Attributes:
result (str): The result from OCR.
time: The time in seconds it took to produce the segmentation including preprocessing.
"""
result: str = Field(description="The result from OCR.")
time: float = Field(
description="The time in seconds it took to produce the segmentation including preprocessing."
)
parent_id: Optional[str] = Field(
description="Identifier of parent image region. Useful when stack of detection-models is in use to refer the RoI being the input to inference",
default=None,
)
|