model-scan-2 / model.py
pengdaqian
init scan
cb34746
raw
history blame contribute delete
758 Bytes
from typing import List, Optional
from pydantic import BaseModel
class ImageScanRequest(BaseModel):
imageId: int
url: str
wait: bool
scans: List[int]
callbackUrl: str
class ImageScanTag(BaseModel):
type: str
name: str
class ImageScanResponse(BaseModel):
ok: bool
error: str
deleted: bool
blockedFor: List[str]
tags: List[ImageScanTag]
class ImageTag(BaseModel):
tag: str
id: Optional[int]
confidence: int
class ImageScanCallbackRequest(BaseModel):
id: int
isValid: bool
tags: List[ImageTag]
class ModelScanRequest(BaseModel):
callbackUrl: str
fileUrl: str
lowPriority: bool
tasks: List[str]
class ModelScanResponse(BaseModel):
ok: bool
error: str