Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -172,7 +172,7 @@ def process_example(prompt):
|
|
| 172 |
|
| 173 |
# example_prompts ๋ณ์์ process_example ํจ์ ์ ๊ฑฐ
|
| 174 |
|
| 175 |
-
# Gradio
|
| 176 |
with gr.Blocks(
|
| 177 |
theme=gr.themes.Soft(),
|
| 178 |
css="""
|
|
@@ -313,30 +313,16 @@ with gr.Blocks(
|
|
| 313 |
gallery_html += "</div>"
|
| 314 |
gr.HTML(gallery_html)
|
| 315 |
|
| 316 |
-
# ์ด๋ฒคํธ ํธ๋ค๋ฌ ๋ถ๋ถ์ ์์
|
| 317 |
-
def update_seed():
|
| 318 |
-
return get_random_seed()
|
| 319 |
-
|
| 320 |
# ์ด๋ฒคํธ ํธ๋ค๋ฌ
|
| 321 |
generate_btn.click(
|
| 322 |
fn=process_and_save_image,
|
| 323 |
-
inputs=[
|
| 324 |
-
height,
|
| 325 |
-
width,
|
| 326 |
-
steps,
|
| 327 |
-
scales,
|
| 328 |
-
prompt,
|
| 329 |
-
seed
|
| 330 |
-
],
|
| 331 |
outputs=output
|
| 332 |
-
).then(
|
| 333 |
-
fn=update_seed,
|
| 334 |
-
outputs=[seed]
|
| 335 |
)
|
| 336 |
|
| 337 |
randomize_seed.click(
|
| 338 |
-
fn=
|
| 339 |
-
outputs=
|
| 340 |
)
|
| 341 |
|
| 342 |
if __name__ == "__main__":
|
|
|
|
| 172 |
|
| 173 |
# example_prompts ๋ณ์์ process_example ํจ์ ์ ๊ฑฐ
|
| 174 |
|
| 175 |
+
# Gradio ์ธํฐํ์ด์ค
|
| 176 |
with gr.Blocks(
|
| 177 |
theme=gr.themes.Soft(),
|
| 178 |
css="""
|
|
|
|
| 313 |
gallery_html += "</div>"
|
| 314 |
gr.HTML(gallery_html)
|
| 315 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 316 |
# ์ด๋ฒคํธ ํธ๋ค๋ฌ
|
| 317 |
generate_btn.click(
|
| 318 |
fn=process_and_save_image,
|
| 319 |
+
inputs=[height, width, steps, scales, prompt, seed],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 320 |
outputs=output
|
|
|
|
|
|
|
|
|
|
| 321 |
)
|
| 322 |
|
| 323 |
randomize_seed.click(
|
| 324 |
+
fn=get_random_seed,
|
| 325 |
+
outputs=seed
|
| 326 |
)
|
| 327 |
|
| 328 |
if __name__ == "__main__":
|