Commit ·
0ea9e4a
1
Parent(s): e050d47
Restrict demo.load to avoid repeated gallery loading
Browse files- ui/layout.py +1 -1
ui/layout.py
CHANGED
|
@@ -73,7 +73,7 @@ def build_ui(event_handler_function):
|
|
| 73 |
gr.Markdown("<div style='text-align: center; margin-top: 20px;'>Made by RioShiina with ❤️<br><a href='https://github.com/RioShiina47' target='_blank'>GitHub</a> | <a href='https://huggingface.co/RioShiina' target='_blank'>Hugging Face</a> | <a href='https://civitai.com/user/RioShiina' target='_blank'>Civitai</a></div>")
|
| 74 |
|
| 75 |
# Load gallery images on startup using the helper defined earlier.
|
| 76 |
-
demo.load(fn=load_gallery_images, outputs=ui_components["gallery"])
|
| 77 |
|
| 78 |
# Connect event handlers (e.g., button clicks) with the UI components.
|
| 79 |
event_handler_function(ui_components, demo)
|
|
|
|
| 73 |
gr.Markdown("<div style='text-align: center; margin-top: 20px;'>Made by RioShiina with ❤️<br><a href='https://github.com/RioShiina47' target='_blank'>GitHub</a> | <a href='https://huggingface.co/RioShiina' target='_blank'>Hugging Face</a> | <a href='https://civitai.com/user/RioShiina' target='_blank'>Civitai</a></div>")
|
| 74 |
|
| 75 |
# Load gallery images on startup using the helper defined earlier.
|
| 76 |
+
demo.load(fn=load_gallery_images, inputs=[], outputs=ui_components["gallery"])
|
| 77 |
|
| 78 |
# Connect event handlers (e.g., button clicks) with the UI components.
|
| 79 |
event_handler_function(ui_components, demo)
|