Spaces:
Sleeping
Sleeping
import os | |
import gradio as gr | |
from glob import glob | |
models = glob("models/*") | |
#cats = glob("models/coco_SDXL_simpleprompt/*") | |
with gr.Blocks() as demo: | |
for model in models: | |
with gr.Tab(model.split("/")[-1]) as tab: | |
cats = glob(model+"/*") | |
for cat in cats: | |
with gr.Tab(cat.split("/")[-1]) as tab: | |
gallery = gr.Gallery(value=glob(os.path.join(cat, "*.jpg")), | |
label="Generated images", | |
show_label=False, elem_id="gallery", | |
columns=[5], | |
rows=[1], | |
object_fit="contain", | |
height="auto") | |
if __name__ == "__main__": | |
demo.launch() |