File size: 718 Bytes
f292456 |
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 |
from typing import List, Dict
from modules.api import models as sd_models
from pydantic import BaseModel, Field
class TaggerInterrogateRequest(sd_models.InterrogateRequest):
model: str = Field(
title='Model',
description='The interrogate model used.'
)
threshold: float = Field(
default=0.35,
title='Threshold',
description='',
ge=0,
le=1
)
class TaggerInterrogateResponse(BaseModel):
caption: Dict[str, float] = Field(
title='Caption',
description='The generated caption for the image.'
)
class InterrogatorsResponse(BaseModel):
models: List[str] = Field(
title='Models',
description=''
)
|