From c4e005efec0bf055fea08f1323567cde0d1cfa86 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Mon, 8 Jan 2024 17:49:54 -0800 Subject: [PATCH] Fix dropdown menus sometimes failing to refresh --- modules/ui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui.py b/modules/ui.py index a2638ac..d543bff 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -249,7 +249,7 @@ def create_refresh_button(refresh_component, refresh_method, refreshed_args, ele refresh_button = gr.Button(refresh_symbol, elem_classes=elem_class, interactive=interactive) refresh_button.click( - fn=refresh, + fn=lambda: {k: tuple(v) if type(k) is list else v for k, v in refresh().items()}, inputs=[], outputs=[refresh_component] )