Update app.py
Browse files
app.py
CHANGED
|
@@ -48,6 +48,16 @@ def inference(
|
|
| 48 |
|
| 49 |
return image, seed
|
| 50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
|
| 52 |
examples = [
|
| 53 |
"Claude Monet's 1916 painting, Water Lilies, which is currently on display at the Metropolitan Museum of Art. The painting depicts a tranquil pond with water lilies floating on the surface, surrounded by lush green foliage and a variety of colorful flowers. The colors of the flowers range from bright pinks and purples to deep blues and greens, creating a peaceful and calming atmosphere. [trigger]",
|
|
@@ -154,6 +164,16 @@ with gr.Blocks(theme="Yntec/HaleyCH_Theme_Orange", css=css
|
|
| 154 |
],
|
| 155 |
outputs=[result, seed],
|
| 156 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 157 |
|
| 158 |
demo.queue()
|
| 159 |
demo.launch()
|
|
|
|
| 48 |
|
| 49 |
return image, seed
|
| 50 |
|
| 51 |
+
def load_predefined_images():
|
| 52 |
+
predefined_images = [
|
| 53 |
+
"assets/cm1.webp",
|
| 54 |
+
"assets/cm2.webp",
|
| 55 |
+
"assets/cm3.webp",
|
| 56 |
+
"assets/cm4.webp",
|
| 57 |
+
"assets/cm5.webp",
|
| 58 |
+
"assets/cm6.webp",
|
| 59 |
+
]
|
| 60 |
+
return predefined_images
|
| 61 |
|
| 62 |
examples = [
|
| 63 |
"Claude Monet's 1916 painting, Water Lilies, which is currently on display at the Metropolitan Museum of Art. The painting depicts a tranquil pond with water lilies floating on the surface, surrounded by lush green foliage and a variety of colorful flowers. The colors of the flowers range from bright pinks and purples to deep blues and greens, creating a peaceful and calming atmosphere. [trigger]",
|
|
|
|
| 164 |
],
|
| 165 |
outputs=[result, seed],
|
| 166 |
)
|
| 167 |
+
|
| 168 |
+
# Add gallery section at the bottom
|
| 169 |
+
gr.Markdown("### Claude Monet Style Examples")
|
| 170 |
+
predefined_gallery = gr.Gallery(
|
| 171 |
+
label="Sample Images",
|
| 172 |
+
columns=3,
|
| 173 |
+
rows=2,
|
| 174 |
+
show_label=False,
|
| 175 |
+
value=load_predefined_images()
|
| 176 |
+
)
|
| 177 |
|
| 178 |
demo.queue()
|
| 179 |
demo.launch()
|