Spaces:
Running
on
Zero
Running
on
Zero
prithivMLmods
commited on
Commit
•
9b16b5e
1
Parent(s):
6280c0d
Update app.py
Browse files
app.py
CHANGED
@@ -130,6 +130,23 @@ def generate(
|
|
130 |
image_paths = [save_image(img) for img in images]
|
131 |
return image_paths, seed
|
132 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
with gr.Blocks(css=css, theme="bethecloud/storj_theme", js=js_func) as demo:
|
134 |
gr.Markdown(DESCRIPTIONx)
|
135 |
|
@@ -246,5 +263,9 @@ with gr.Blocks(css=css, theme="bethecloud/storj_theme", js=js_func) as demo:
|
|
246 |
api_name="run",
|
247 |
)
|
248 |
|
|
|
|
|
|
|
|
|
249 |
if __name__ == "__main__":
|
250 |
demo.queue(max_size=40).launch(show_api=False)
|
|
|
130 |
image_paths = [save_image(img) for img in images]
|
131 |
return image_paths, seed
|
132 |
|
133 |
+
def load_predefined_images():
|
134 |
+
predefined_images = [
|
135 |
+
"assets/1.png",
|
136 |
+
"assets/2.png",
|
137 |
+
"assets/3.png",
|
138 |
+
"assets/4.png",
|
139 |
+
"assets/5.png",
|
140 |
+
"assets/6.png",
|
141 |
+
"assets/7.png",
|
142 |
+
"assets/8.png",
|
143 |
+
"assets/9.png",
|
144 |
+
"assets/10.png",
|
145 |
+
"assets/11.png",
|
146 |
+
"assets/12.png",
|
147 |
+
]
|
148 |
+
return predefined_images
|
149 |
+
|
150 |
with gr.Blocks(css=css, theme="bethecloud/storj_theme", js=js_func) as demo:
|
151 |
gr.Markdown(DESCRIPTIONx)
|
152 |
|
|
|
263 |
api_name="run",
|
264 |
)
|
265 |
|
266 |
+
gr.Markdown("### Image Gallery")
|
267 |
+
predefined_gallery = gr.Gallery(label="Image Gallery", columns=4, show_label=False, value=load_predefined_images())
|
268 |
+
|
269 |
+
|
270 |
if __name__ == "__main__":
|
271 |
demo.queue(max_size=40).launch(show_api=False)
|