Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -123,16 +123,16 @@ def get_image_path_list(folder_name):
|
|
123 |
def get_example():
|
124 |
case = [
|
125 |
[
|
126 |
-
get_image_path_list('./examples/
|
127 |
-
"
|
128 |
-
|
129 |
-
"
|
130 |
],
|
131 |
[
|
132 |
-
get_image_path_list('./examples/
|
133 |
-
"
|
134 |
-
|
135 |
-
"
|
136 |
],
|
137 |
]
|
138 |
return case
|
@@ -215,7 +215,7 @@ with gr.Blocks(css=css) as demo:
|
|
215 |
with gr.Column(visible=False) as clear_button:
|
216 |
remove_and_reupload = gr.ClearButton(value="Remove and upload new ones", components=files, size="sm")
|
217 |
prompt = gr.Textbox(label="Prompt",
|
218 |
-
info="Try something like 'a photo of a man/woman img'
|
219 |
placeholder="A photo of a [man/woman img]...")
|
220 |
style = gr.Dropdown(label="Style template", choices=STYLE_NAMES, value=DEFAULT_STYLE_NAME)
|
221 |
submit = gr.Button("Submit")
|
@@ -245,7 +245,7 @@ with gr.Blocks(css=css) as demo:
|
|
245 |
minimum=1,
|
246 |
maximum=4,
|
247 |
step=1,
|
248 |
-
value=
|
249 |
)
|
250 |
guidance_scale = gr.Slider(
|
251 |
label="Guidance scale",
|
@@ -286,7 +286,7 @@ with gr.Blocks(css=css) as demo:
|
|
286 |
|
287 |
gr.Examples(
|
288 |
examples=get_example(),
|
289 |
-
inputs=[files, prompt,
|
290 |
run_on_click=True,
|
291 |
fn=upload_example_to_gallery,
|
292 |
outputs=[uploaded_files, clear_button, files],
|
|
|
123 |
def get_example():
|
124 |
case = [
|
125 |
[
|
126 |
+
get_image_path_list('./examples/yangmi_woman'),
|
127 |
+
"a woman img, retro futurism, retro game art style but extremely beautiful, intricate details, masterpiece, best quality, space-themed, cosmic, celestial, stars, galaxies, nebulas, planets, science fiction, highly detailed",
|
128 |
+
35,
|
129 |
+
"realistic, photo-realistic, worst quality, greyscale, bad anatomy, bad hands, error, text",
|
130 |
],
|
131 |
[
|
132 |
+
get_image_path_list('./examples/lenna_woman'),
|
133 |
+
"A girl img riding dragon over a whimsical castle, 3d CGI, art by Pixar, half-body, screenshot from animation",
|
134 |
+
20,
|
135 |
+
"realistic, photo-realistic, bad quality, bad anatomy, worst quality, low quality, lowres, extra fingers, blur, blurry, ugly, wrong proportions, watermark, image artifacts, bad eyes",
|
136 |
],
|
137 |
]
|
138 |
return case
|
|
|
215 |
with gr.Column(visible=False) as clear_button:
|
216 |
remove_and_reupload = gr.ClearButton(value="Remove and upload new ones", components=files, size="sm")
|
217 |
prompt = gr.Textbox(label="Prompt",
|
218 |
+
info="Try something like 'a photo of a man/woman img', 'img' is the trigger word.",
|
219 |
placeholder="A photo of a [man/woman img]...")
|
220 |
style = gr.Dropdown(label="Style template", choices=STYLE_NAMES, value=DEFAULT_STYLE_NAME)
|
221 |
submit = gr.Button("Submit")
|
|
|
245 |
minimum=1,
|
246 |
maximum=4,
|
247 |
step=1,
|
248 |
+
value=2,
|
249 |
)
|
250 |
guidance_scale = gr.Slider(
|
251 |
label="Guidance scale",
|
|
|
286 |
|
287 |
gr.Examples(
|
288 |
examples=get_example(),
|
289 |
+
inputs=[files, prompt, style_strength_ratio, negative_prompt],
|
290 |
run_on_click=True,
|
291 |
fn=upload_example_to_gallery,
|
292 |
outputs=[uploaded_files, clear_button, files],
|
examples/lenna_woman/lenna.jpg
ADDED
examples/yangmi_woman/yangmi_1.jpg
ADDED
examples/yangmi_woman/yangmi_2.jpeg
ADDED
examples/yangmi_woman/yangmi_3.jpg
ADDED
examples/yangmi_woman/yangmi_4.jpg
ADDED
examples/yangmi_woman/yangmi_5.jpg
ADDED
examples/yangmi_woman/yangmi_6.jpg
ADDED