项目初始化
This commit is contained in:
18
schemas/orc_result.py
Normal file
18
schemas/orc_result.py
Normal file
@@ -0,0 +1,18 @@
|
||||
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)
|
||||
|
Reference in New Issue
Block a user