Spaces:
Runtime error
Runtime error
Vincent Claes
commited on
Commit
·
c9f4a0e
1
Parent(s):
59df02f
add examples
Browse files
app.py
CHANGED
@@ -156,6 +156,14 @@ css = """
|
|
156 |
#component-16{border-top-width: 1px!important;margin-top: 1em}
|
157 |
.image_duplication{position: absolute; width: 100px; left: 50px}
|
158 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
|
160 |
block = gr.Blocks(css=css)
|
161 |
|
@@ -207,7 +215,13 @@ with block:
|
|
207 |
label="Art Pieces", show_label=False, elem_id="gallery"
|
208 |
).style(grid=[2], height="auto", container=True)
|
209 |
btn.click(get_images, inputs=text, outputs=gallery, postprocess=False)
|
210 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
gr.HTML(
|
212 |
"""
|
213 |
<div class="footer">
|
|
|
156 |
#component-16{border-top-width: 1px!important;margin-top: 1em}
|
157 |
.image_duplication{position: absolute; width: 100px; left: 50px}
|
158 |
"""
|
159 |
+
examples = [
|
160 |
+
"people standing around a dead person",
|
161 |
+
"a knight on a horse",
|
162 |
+
"a woman in armor",
|
163 |
+
"a father mourning for his child",
|
164 |
+
"van eyck",
|
165 |
+
"cubism",
|
166 |
+
]
|
167 |
|
168 |
block = gr.Blocks(css=css)
|
169 |
|
|
|
215 |
label="Art Pieces", show_label=False, elem_id="gallery"
|
216 |
).style(grid=[2], height="auto", container=True)
|
217 |
btn.click(get_images, inputs=text, outputs=gallery, postprocess=False)
|
218 |
+
ex = gr.Examples(
|
219 |
+
examples=examples,
|
220 |
+
fn=get_images,
|
221 |
+
inputs=text,
|
222 |
+
outputs=gallery,
|
223 |
+
cache_examples=False,
|
224 |
+
)
|
225 |
gr.HTML(
|
226 |
"""
|
227 |
<div class="footer">
|