import os import gradio as gr from glob import glob cats = glob("models/coco_SDXL_simpleprompt/*") with gr.Blocks() as demo: 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=[3], rows=[1], object_fit="contain", height="auto") if __name__ == "__main__": demo.launch()