diff options
author | Keavon Chambers <keavon@keavon.com> | 2022-11-19 10:34:31 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-19 10:34:31 -0800 |
commit | 2f90496b19cd9c512633742db97b072a7075f017 (patch) | |
tree | 60d2dddd69172d9b5cf58c8da2bd64c61132f4fa /modules/api/models.py | |
parent | a258fd60dbe2d68325339405a2aa72816d06d2fd (diff) | |
parent | 47a44c7e421b98ca07e92dbf88769b04c9e28f86 (diff) |
Merge branch 'master' into cors-regex
Diffstat (limited to 'modules/api/models.py')
-rw-r--r-- | modules/api/models.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/api/models.py b/modules/api/models.py index 34dbfa16..f77951fc 100644 --- a/modules/api/models.py +++ b/modules/api/models.py @@ -170,14 +170,15 @@ class ProgressResponse(BaseModel): class InterrogateRequest(BaseModel): image: str = Field(default="", title="Image", description="Image to work on, must be a Base64 string containing the image's data.") + model: str = Field(default="clip", title="Model", description="The interrogate model used.") class InterrogateResponse(BaseModel): caption: str = Field(default=None, title="Caption", description="The generated caption for the image.") fields = {} -for key, value in opts.data.items(): - metadata = opts.data_labels.get(key) - optType = opts.typemap.get(type(value), type(value)) +for key, metadata in opts.data_labels.items(): + value = opts.data.get(key) + optType = opts.typemap.get(type(metadata.default), type(value)) if (metadata is not None): fields.update({key: (Optional[optType], Field( |