diff --git a/extensions/gallery/script.py b/extensions/gallery/script.py index 611a11f4..efe96ba9 100644 --- a/extensions/gallery/script.py +++ b/extensions/gallery/script.py @@ -91,11 +91,13 @@ def ui(): with gr.Accordion("Character gallery", open=False, elem_id='gallery-extension'): update = gr.Button("Refresh") gr.HTML(value="") - gallery = gr.Dataset(components=[gr.HTML(visible=False)], - label="", - samples=generate_html(), - elem_classes=["character-gallery"], - samples_per_page=50 - ) + gallery = gr.Dataset( + components=[gr.HTML(visible=False)], + label="", + samples=generate_html(), + elem_classes=["character-gallery"], + samples_per_page=50 + ) + update.click(generate_html, [], gallery) gallery.select(select_character, None, gradio['character_menu']) diff --git a/js/main.js b/js/main.js index 2e0c765b..1e50e147 100644 --- a/js/main.js +++ b/js/main.js @@ -373,4 +373,3 @@ function toggleBigPicture() { } } -showBigPicture(); diff --git a/js/show_controls.js b/js/show_controls.js index 0173963b..0ba1ecde 100644 --- a/js/show_controls.js +++ b/js/show_controls.js @@ -10,6 +10,12 @@ function toggle_controls(value) { chatParent.classList.remove("bigchat"); document.getElementById("chat-input-row").classList.remove("bigchat"); document.getElementById("chat-col").classList.remove("bigchat"); + + let gallery_element = document.getElementById('gallery-extension'); + if (gallery_element) { + gallery_element.style.display = 'block'; + } + } else { belowChatInput.forEach(element => { element.style.display = "none";