ginipick commited on
Commit
ab2e0a6
ยท
verified ยท
1 Parent(s): a8e83b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -18
app.py CHANGED
@@ -172,7 +172,7 @@ def process_example(prompt):
172
 
173
  # example_prompts ๋ณ€์ˆ˜์™€ process_example ํ•จ์ˆ˜ ์ œ๊ฑฐ
174
 
175
- # Gradio ์ธํ„ฐํŽ˜์ด์Šค์—์„œ Examples ์„น์…˜์„ ์ œ๊ฑฐํ•˜๊ณ  ๊ฐค๋Ÿฌ๋ฆฌ๋งŒ ๋‚จ๊น€
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=update_seed,
339
- outputs=[seed]
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__":