Fix update event in refresh buttons (#5197)

This commit is contained in:
mamei16 2024-01-09 18:49:37 +01:00 committed by GitHub
parent 4333d82b9d
commit bec4e0a1ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -245,9 +245,6 @@ def create_refresh_button(refresh_component, refresh_method, refreshed_args, ele
refresh_method() refresh_method()
args = refreshed_args() if callable(refreshed_args) else refreshed_args args = refreshed_args() if callable(refreshed_args) else refreshed_args
for k, v in args.items():
setattr(refresh_component, k, v)
return gr.update(**(args or {})) return gr.update(**(args or {}))
refresh_button = gr.Button(refresh_symbol, elem_classes=elem_class, interactive=interactive) refresh_button = gr.Button(refresh_symbol, elem_classes=elem_class, interactive=interactive)