Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -103,20 +103,21 @@ def save_image(image):
|
|
| 103 |
print(f"Error in save_image: {str(e)}")
|
| 104 |
return None
|
| 105 |
|
| 106 |
-
# μμ ν둬ννΈ μ μ
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
]
|
| 119 |
|
|
|
|
| 120 |
@spaces.GPU
|
| 121 |
def process_and_save_image(height=1024, width=1024, steps=8, scales=3.5, prompt="", seed=None):
|
| 122 |
global pipe
|
|
@@ -300,16 +301,19 @@ with gr.Blocks(
|
|
| 300 |
gallery_html += "</div>"
|
| 301 |
gr.HTML(gallery_html)
|
| 302 |
|
|
|
|
|
|
|
| 303 |
# Examples μΉμ
|
| 304 |
gr.Examples(
|
| 305 |
-
examples=
|
| 306 |
inputs=prompt,
|
| 307 |
outputs=output,
|
| 308 |
fn=process_example,
|
| 309 |
-
cache_examples=False
|
| 310 |
-
examples_per_page=5
|
| 311 |
)
|
| 312 |
|
|
|
|
|
|
|
| 313 |
def update_seed():
|
| 314 |
return get_random_seed()
|
| 315 |
|
|
|
|
| 103 |
print(f"Error in save_image: {str(e)}")
|
| 104 |
return None
|
| 105 |
|
| 106 |
+
# μμ ν둬ννΈ μ μ λΆλΆμ μμ
|
| 107 |
+
example_prompts = [
|
| 108 |
+
"A 3D Star Wars Darth Vader helmet, highly detailed metallic finish",
|
| 109 |
+
"A 3D Iron Man mask with glowing eyes and metallic red-gold finish",
|
| 110 |
+
"A 3D Pokemon Pikachu figure with glossy surface",
|
| 111 |
+
"A 3D geometric abstract cube transforming into a sphere, metallic finish",
|
| 112 |
+
"A 3D steampunk mechanical heart with brass and copper details",
|
| 113 |
+
"A 3D crystal dragon with transparent iridescent scales",
|
| 114 |
+
"A 3D futuristic hovering drone with neon light accents",
|
| 115 |
+
"A 3D ancient Greek warrior helmet with ornate details",
|
| 116 |
+
"A 3D robotic butterfly with mechanical wings and metallic finish",
|
| 117 |
+
"A 3D floating magical crystal orb with internal energy swirls"
|
| 118 |
]
|
| 119 |
|
| 120 |
+
|
| 121 |
@spaces.GPU
|
| 122 |
def process_and_save_image(height=1024, width=1024, steps=8, scales=3.5, prompt="", seed=None):
|
| 123 |
global pipe
|
|
|
|
| 301 |
gallery_html += "</div>"
|
| 302 |
gr.HTML(gallery_html)
|
| 303 |
|
| 304 |
+
|
| 305 |
+
# Gradio μΈν°νμ΄μ€μ Examples λΆλΆμ μμ
|
| 306 |
# Examples μΉμ
|
| 307 |
gr.Examples(
|
| 308 |
+
examples=[[p] for p in example_prompts],
|
| 309 |
inputs=prompt,
|
| 310 |
outputs=output,
|
| 311 |
fn=process_example,
|
| 312 |
+
cache_examples=False
|
|
|
|
| 313 |
)
|
| 314 |
|
| 315 |
+
|
| 316 |
+
|
| 317 |
def update_seed():
|
| 318 |
return get_random_seed()
|
| 319 |
|