diff --git a/extensions/gallery/script.py b/extensions/gallery/script.py index fbf23bc9..e96fe40a 100644 --- a/extensions/gallery/script.py +++ b/extensions/gallery/script.py @@ -1,20 +1,23 @@ from pathlib import Path - import gradio as gr - from modules.html_generator import get_image_cache +from modules.chat import load_character +from modules.shared import gradio, settings - -def generate_html(): +def generate_css(): css = """ - .character-gallery { + .character-gallery > .gallery { margin: 1rem 0; - display: grid; + display: grid !important; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); grid-column-gap: 0.4rem; grid-row-gap: 1.2rem; } + .character-gallery > .label { + display: none !important; + } + .character-container { cursor: pointer; text-align: center; @@ -45,14 +48,16 @@ def generate_html(): overflow-wrap: anywhere; } """ + return css - container_html = f'