diff --git a/extensions/gallery/script.py b/extensions/gallery/script.py new file mode 100644 index 00000000..8d606352 --- /dev/null +++ b/extensions/gallery/script.py @@ -0,0 +1,62 @@ +import json +import os +from pathlib import Path + +import gradio as gr + + +def generate_html(): + css = """ + .character-gallery table { + border-collapse: collapse; + table-layout: fixed; + width: 100%; + } + + .character-gallery th, .character-gallery td { + padding: 8px; + } + + .character-gallery img { + width: 150px; + height: 200px; + object-fit: cover; + } + + .character-gallery .placeholder { + width: 150px; + height: 200px; + background-color: gray; + } + + .character-gallery td { + text-align: center; + vertical-align: middle; + } + """ + + table_html = f'
{image_html} | {image_name} | " + table_html += "