Spaces:
Build error
Build error
s194649 commited on
Commit ·
ae07495
1
Parent(s): 756f718
/w n models
Browse files
app.py
CHANGED
|
@@ -1,15 +1,18 @@
|
|
| 1 |
import os
|
| 2 |
import gradio as gr
|
| 3 |
from glob import glob
|
| 4 |
-
|
| 5 |
-
cats = glob("models/coco_SDXL_simpleprompt/*")
|
| 6 |
|
| 7 |
|
| 8 |
with gr.Blocks() as demo:
|
| 9 |
-
for
|
| 10 |
-
with gr.Tab(
|
| 11 |
-
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
|
| 15 |
|
|
|
|
| 1 |
import os
|
| 2 |
import gradio as gr
|
| 3 |
from glob import glob
|
| 4 |
+
models = glob("models/*")
|
| 5 |
+
#cats = glob("models/coco_SDXL_simpleprompt/*")
|
| 6 |
|
| 7 |
|
| 8 |
with gr.Blocks() as demo:
|
| 9 |
+
for model in models:
|
| 10 |
+
with gr.Tab(model.split("/")[-1]) as tab:
|
| 11 |
+
cats = glob(model+"/*")
|
| 12 |
+
for cat in cats:
|
| 13 |
+
with gr.Tab(cat.split("/")[-1]) as tab:
|
| 14 |
+
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")
|
| 15 |
+
|
| 16 |
|
| 17 |
|
| 18 |
|