Only show extension in UI if it has an ui() function

This commit is contained in:
oobabooga 2023-05-02 19:20:02 -03:00
parent d016c38640
commit 4e09df4034

View File

@ -128,6 +128,6 @@ def create_extensions_block():
if should_display_ui: if should_display_ui:
with gr.Column(elem_id="extensions"): with gr.Column(elem_id="extensions"):
for extension, name in iterator(): for extension, name in iterator():
gr.Markdown(f"\n### {name}")
if hasattr(extension, "ui"): if hasattr(extension, "ui"):
gr.Markdown(f"\n### {name}")
extension.ui() extension.ui()