Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -853,13 +853,12 @@ footer {
|
|
853 |
}
|
854 |
"""
|
855 |
|
856 |
-
|
857 |
def create_demo():
|
858 |
with gr.Blocks(theme="Yntec/HaleyCH_Theme_Orange", css=css) as demo:
|
859 |
|
860 |
with gr.Row():
|
861 |
with gr.Column():
|
862 |
-
prompt = gr.Textbox(label="Prompt(
|
863 |
|
864 |
width = gr.Slider(minimum=128, maximum=2048, step=64, label="Width", value=768)
|
865 |
height = gr.Slider(minimum=128, maximum=2048, step=64, label="Height", value=768)
|
@@ -888,17 +887,26 @@ def create_demo():
|
|
888 |
outputs=[init_image, image2image_strength, resize_img]
|
889 |
)
|
890 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
891 |
generate_button.click(
|
892 |
fn=generate_image,
|
893 |
inputs=[prompt, width, height, guidance, inference_steps, seed, do_img2img, init_image, image2image_strength, resize_img],
|
894 |
outputs=[output_image, output_seed]
|
895 |
)
|
896 |
-
|
897 |
-
examples = [
|
898 |
-
"a tiny astronaut hatching from an egg on the moon",
|
899 |
-
"a cat holding a sign that says hello world",
|
900 |
-
"an anime illustration of a wiener schnitzel",
|
901 |
-
]
|
902 |
|
903 |
return demo
|
904 |
|
|
|
853 |
}
|
854 |
"""
|
855 |
|
|
|
856 |
def create_demo():
|
857 |
with gr.Blocks(theme="Yntec/HaleyCH_Theme_Orange", css=css) as demo:
|
858 |
|
859 |
with gr.Row():
|
860 |
with gr.Column():
|
861 |
+
prompt = gr.Textbox(label="Prompt(한글/일본어/중국어 가능)", value="A cute and fluffy golden retriever puppy sitting upright, holding a neatly designed white sign with bold, colorful lettering that reads 'Have a Happy Day!' in cheerful fonts. The puppy has expressive, sparkling eyes, a happy smile, and fluffy ears slightly flopped. The background is a vibrant and sunny meadow with soft-focus flowers, glowing sunlight filtering through the trees, and a warm golden glow that enhances the joyful atmosphere. The sign is framed with small decorative flowers, adding a charming and wholesome touch. Ensure the text on the sign is clear and legible.")
|
862 |
|
863 |
width = gr.Slider(minimum=128, maximum=2048, step=64, label="Width", value=768)
|
864 |
height = gr.Slider(minimum=128, maximum=2048, step=64, label="Height", value=768)
|
|
|
887 |
outputs=[init_image, image2image_strength, resize_img]
|
888 |
)
|
889 |
|
890 |
+
examples = [
|
891 |
+
["A magical fairy garden with glowing mushrooms and floating lanterns"], # English
|
892 |
+
["아름다운 벚꽃이 흩날리는 한옥 정원에서 한복을 입은 소녀"], # Korean
|
893 |
+
["夕暮れの富士山と桜の木の下で休んでいる可愛い柴犬"], # Japanese
|
894 |
+
["古老的中国庭园里,一只熊猫正在竹林中悠闲地吃着竹子"] # Chinese
|
895 |
+
]
|
896 |
+
|
897 |
+
gr.Examples(
|
898 |
+
examples=examples,
|
899 |
+
inputs=prompt,
|
900 |
+
outputs=[output_image, output_seed],
|
901 |
+
fn=generate_image,
|
902 |
+
cache_examples=True
|
903 |
+
)
|
904 |
+
|
905 |
generate_button.click(
|
906 |
fn=generate_image,
|
907 |
inputs=[prompt, width, height, guidance, inference_steps, seed, do_img2img, init_image, image2image_strength, resize_img],
|
908 |
outputs=[output_image, output_seed]
|
909 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
910 |
|
911 |
return demo
|
912 |
|