mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 08:07:56 +01:00
Fix disappearing character gallery
This commit is contained in:
parent
9da7bb203d
commit
8cf05c1b31
@ -91,11 +91,13 @@ def ui():
|
|||||||
with gr.Accordion("Character gallery", open=False, elem_id='gallery-extension'):
|
with gr.Accordion("Character gallery", open=False, elem_id='gallery-extension'):
|
||||||
update = gr.Button("Refresh")
|
update = gr.Button("Refresh")
|
||||||
gr.HTML(value="<style>" + generate_css() + "</style>")
|
gr.HTML(value="<style>" + generate_css() + "</style>")
|
||||||
gallery = gr.Dataset(components=[gr.HTML(visible=False)],
|
gallery = gr.Dataset(
|
||||||
label="",
|
components=[gr.HTML(visible=False)],
|
||||||
samples=generate_html(),
|
label="",
|
||||||
elem_classes=["character-gallery"],
|
samples=generate_html(),
|
||||||
samples_per_page=50
|
elem_classes=["character-gallery"],
|
||||||
)
|
samples_per_page=50
|
||||||
|
)
|
||||||
|
|
||||||
update.click(generate_html, [], gallery)
|
update.click(generate_html, [], gallery)
|
||||||
gallery.select(select_character, None, gradio['character_menu'])
|
gallery.select(select_character, None, gradio['character_menu'])
|
||||||
|
@ -373,4 +373,3 @@ function toggleBigPicture() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
showBigPicture();
|
|
||||||
|
@ -10,6 +10,12 @@ function toggle_controls(value) {
|
|||||||
chatParent.classList.remove("bigchat");
|
chatParent.classList.remove("bigchat");
|
||||||
document.getElementById("chat-input-row").classList.remove("bigchat");
|
document.getElementById("chat-input-row").classList.remove("bigchat");
|
||||||
document.getElementById("chat-col").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 {
|
} else {
|
||||||
belowChatInput.forEach(element => {
|
belowChatInput.forEach(element => {
|
||||||
element.style.display = "none";
|
element.style.display = "none";
|
||||||
|
Loading…
Reference in New Issue
Block a user