gradio 3.41.2 attempt

This commit is contained in:
w-e-w
2023-11-27 20:30:49 +09:00
parent f0f100e67b
commit 08c68820cd
6 changed files with 78 additions and 9 deletions

View File

@@ -93,8 +93,8 @@ class PydanticModelGenerator:
d.field: (d.field_type, Field(default=d.field_value, alias=d.field_alias, exclude=d.field_exclude)) for d in self._model_def
}
DynamicModel = create_model(self._model_name, **fields)
DynamicModel.__config__.allow_population_by_field_name = True
DynamicModel.__config__.allow_mutation = True
DynamicModel.model_config['populate_by_name'] = True
DynamicModel.model_config['frozen'] = True
return DynamicModel
StableDiffusionTxt2ImgProcessingAPI = PydanticModelGenerator(