Update ui_tempdir.py

Make override function have the same input parameters with original function
This commit is contained in:
Vesnica 2023-06-04 14:20:23 +08:00 committed by GitHub
parent 30bbb8bce3
commit 08f93da17c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ def check_tmp_file(gradio, filename):
return False
def save_pil_to_file(self, pil_image, dir=None):
def save_pil_to_file(self, pil_image, dir=None, format="png"):
already_saved_as = getattr(pil_image, 'already_saved_as', None)
if already_saved_as and os.path.isfile(already_saved_as):
register_tmp_file(shared.demo, already_saved_as)