img_txt2 / model.py
next-social's picture
Duplicate from next-social/img_txt
e5c992e
raw
history blame contribute delete
559 Bytes
from typing import List, Optional
from pydantic import BaseModel
class TxtImageScanRequest(BaseModel):
imageId: int
callbackUrl: str
url: str
languages: List[str]
lowPriority: bool
tasks: List[str]
class Tag(BaseModel):
tag: str
id: Optional[int]
confidence: float
class Conversation(BaseModel):
question: str
answer: str
class ConversationCallback(BaseModel):
id: int
conversation: List[Conversation]
extractTags: List[Tag]
class TxtImageScanResponse(BaseModel):
ok: bool
error: str