fix ocr
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
from datetime import datetime
|
||||
from uuid import UUID
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
from app.models.evidence_image import SourceApp, PageType, OcrStatus
|
||||
from app.schemas.base import CamelModel
|
||||
|
||||
|
||||
class ImageOut(BaseModel):
|
||||
class ImageOut(CamelModel):
|
||||
id: UUID
|
||||
case_id: UUID
|
||||
url: str = ""
|
||||
@@ -17,24 +16,25 @@ class ImageOut(BaseModel):
|
||||
file_hash: str
|
||||
uploaded_at: datetime
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
|
||||
class OcrBlockOut(BaseModel):
|
||||
class OcrBlockOut(CamelModel):
|
||||
id: UUID
|
||||
content: str
|
||||
bbox: dict
|
||||
seq_order: int
|
||||
confidence: float
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
|
||||
class ImageDetailOut(ImageOut):
|
||||
ocr_blocks: list[OcrBlockOut] = []
|
||||
|
||||
|
||||
class OcrFieldCorrection(BaseModel):
|
||||
class OcrFieldCorrection(CamelModel):
|
||||
field_name: str
|
||||
old_value: str
|
||||
new_value: str
|
||||
|
||||
|
||||
class CaseOcrStartIn(CamelModel):
|
||||
include_done: bool = False
|
||||
image_ids: list[UUID] = []
|
||||
|
||||
Reference in New Issue
Block a user