mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 16:17:57 +01:00
Simplify gallery
This commit is contained in:
parent
4ab679480e
commit
ca8bb38949
@ -66,13 +66,7 @@ def generate_html():
|
|||||||
container_html = '<div class="character-container">'
|
container_html = '<div class="character-container">'
|
||||||
image_html = "<div class='placeholder'></div>"
|
image_html = "<div class='placeholder'></div>"
|
||||||
|
|
||||||
for i in [
|
for path in [Path(f"characters/{character}.{extension}") for extension in ['png', 'jpg', 'jpeg']]:
|
||||||
f"characters/{character}.png",
|
|
||||||
f"characters/{character}.jpg",
|
|
||||||
f"characters/{character}.jpeg",
|
|
||||||
]:
|
|
||||||
|
|
||||||
path = Path(i)
|
|
||||||
if path.exists():
|
if path.exists():
|
||||||
image_html = f'<img src="file/{get_image_cache(path)}">'
|
image_html = f'<img src="file/{get_image_cache(path)}">'
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user