Spaces:
Sleeping
Sleeping
File size: 758 Bytes
d39fc00 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
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
|