Spaces:
Build error
Build error
s194649
commited on
Commit
·
986f60f
1
Parent(s):
86bd183
app
Browse files
app.py
ADDED
|
@@ -0,0 +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 cat in cats:
|
| 10 |
+
with gr.Tab(cat.split("/")[-1]) as tab:
|
| 11 |
+
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")
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
if __name__ == "__main__":
|
| 18 |
+
demo.launch()
|