mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-12-25 22:08:53 +01:00
Sort the gallery alphabetically
This commit is contained in:
parent
83368875eb
commit
a08802bf70
@ -49,7 +49,7 @@ def generate_html():
|
||||
container_html = f'<style>{css}</style><div class="character-gallery">'
|
||||
|
||||
# Iterate through files in image folder
|
||||
for file in Path("characters").glob("*"):
|
||||
for file in sorted(Path("characters").glob("*")):
|
||||
if file.name.endswith(".json"):
|
||||
character = file.name.replace(".json", "")
|
||||
container_html += f'<div class="character-container" onclick=\'document.getElementById("character-menu").children[1].children[1].value = "{character}"; document.getElementById("character-menu").children[1].children[1].dispatchEvent(new Event("change"));\'>'
|
||||
|
Loading…
Reference in New Issue
Block a user