19 lines
465 B
Python
19 lines
465 B
Python
from pydantic import BaseModel, ConfigDict, field_validator
|
|
|
|
|
|
class ResultInfo(BaseModel):
|
|
bounding_box_left_up: list[int] | None = []
|
|
bounding_box_right_down: list[int] | None = []
|
|
text: str | None = None
|
|
confidence: float | None = None
|
|
|
|
model_config = ConfigDict(from_attributes=True)
|
|
|
|
|
|
class ResultMain(BaseModel):
|
|
file_name: str | None = None
|
|
infos: list[ResultInfo] | None = []
|
|
|
|
model_config = ConfigDict(from_attributes=True)
|
|
|