From acdbd6b708b6c6e91b601a28cdfdb8d86a3cc395 Mon Sep 17 00:00:00 2001 From: Maya <48323879+mayaeary@users.noreply.github.com> Date: Sun, 19 Mar 2023 13:31:21 +0000 Subject: [PATCH] Check if app should display extensions ui --- modules/extensions.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/extensions.py b/modules/extensions.py index defc0d66..b363bc39 100644 --- a/modules/extensions.py +++ b/modules/extensions.py @@ -46,15 +46,18 @@ def create_extensions_block(): if _id in shared.settings: extension.params[param] = shared.settings[_id] + should_display_ui = False # Running setup function if not setup_called: for extension, name in iterator(): if hasattr(extension, "setup"): extension.setup() + if hasattr(extension, "ui"): + should_display_ui = True setup_called = True # Creating the extension ui elements - if len(state) > 0: + if should_display_ui: with gr.Box(elem_id="extensions"): gr.Markdown("Extensions") for extension, name in iterator():