fantaxy commited on
Commit
b585abc
ยท
verified ยท
1 Parent(s): 9710229

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -10
app.py CHANGED
@@ -29,7 +29,7 @@ scheduler_dict = {
29
 
30
  css = """
31
  .toolbutton {
32
- margin-buttom: 0em 0em 0em 0em;
33
  max-width: 2.5em;
34
  min-width: 2.5em !important;
35
  height: 2.5em;
@@ -48,12 +48,11 @@ EXAMPLES = [ # prompt, first frame, width, height, center crop, seed
48
  ["์ฝ˜์—์„œ ๋…น์•„๋‚ด๋ฆฌ๋Š” ์•„์ด์Šคํฌ๋ฆผ.", "example/example_04.png"],
49
  ]
50
 
51
-
52
  EXAMPLES_HIDDEN = {
53
- "timelapse at the snow land with aurora in the sky.": ["example/example_01.png", 256, 256, True, 21800],
54
- "fireworks.": ["example/example_02.png", 256, 256, True, 21800],
55
- "clown fish swimming through the coral reef.": ["example/example_03.png", 256, 256, True, 75692375],
56
- "melting ice cream dripping down the cone.": ["example/example_04.png", 256, 256, True, 21800]
57
  }
58
 
59
  def update_and_resize_image(input_image_path, height_slider, width_slider, center_crop):
@@ -211,7 +210,7 @@ def animate(
211
  )
212
 
213
  # Translate Korean prompt to English
214
- translated_prompt = translator(prompt_textbox, src_lang="ko", tgt_lang="en")[0]['translation_text']
215
 
216
  sample = pipeline(
217
  translated_prompt,
@@ -272,12 +271,12 @@ def ui():
272
  with gr.Column():
273
  with gr.Row():
274
  sampler_dropdown = gr.Dropdown(label="Sampling method", choices=list(scheduler_dict.keys()), value=list(scheduler_dict.keys())[0])
275
- sample_step_slider = gr.Slider(label="Sampling steps", value=250, minimum=10, maximum=250, step=1)
276
 
277
  with gr.Row():
278
  center_crop = gr.Checkbox(label="Center Crop the Image", value=True)
279
- width_slider = gr.Slider(label="Width", value=512, minimum=0, maximum=512, step=64)
280
- height_slider = gr.Slider(label="Height", value=512, minimum=0, maximum=512, step=64)
281
  with gr.Row():
282
  txt_cfg_scale_slider = gr.Slider(label="Text CFG Scale", value=7.5, minimum=1.0, maximum=20.0, step=0.5)
283
  img_cfg_scale_slider = gr.Slider(label="Image CFG Scale", value=1.0, minimum=1.0, maximum=20.0, step=0.5)
 
29
 
30
  css = """
31
  .toolbutton {
32
+ margin-bottom: 0em 0em 0em 0em;
33
  max-width: 2.5em;
34
  min-width: 2.5em !important;
35
  height: 2.5em;
 
48
  ["์ฝ˜์—์„œ ๋…น์•„๋‚ด๋ฆฌ๋Š” ์•„์ด์Šคํฌ๋ฆผ.", "example/example_04.png"],
49
  ]
50
 
 
51
  EXAMPLES_HIDDEN = {
52
+ "์˜ค๋กœ๋ผ๊ฐ€ ํ•˜๋Š˜์— ์žˆ๋Š” ๋ˆˆ ๋ฎ์ธ ๋•…์˜ ํƒ€์ž„๋žฉ์Šค.": ["example/example_01.png", 512, 512, True, 21800],
53
+ "๋ถˆ๊ฝƒ๋†€์ด.": ["example/example_02.png", 512, 512, True, 21800],
54
+ "์‚ฐํ˜ธ์ดˆ๋ฅผ ํ—ค์—„์น˜๋Š” ํฐ๋™๊ฐ€๋ฆฌ.": ["example/example_03.png", 512, 512, True, 75692375],
55
+ "์ฝ˜์—์„œ ๋…น์•„๋‚ด๋ฆฌ๋Š” ์•„์ด์Šคํฌ๋ฆผ.": ["example/example_04.png", 512, 512, True, 21800]
56
  }
57
 
58
  def update_and_resize_image(input_image_path, height_slider, width_slider, center_crop):
 
210
  )
211
 
212
  # Translate Korean prompt to English
213
+ translated_prompt = translator(prompt_textbox)[0]['translation_text']
214
 
215
  sample = pipeline(
216
  translated_prompt,
 
271
  with gr.Column():
272
  with gr.Row():
273
  sampler_dropdown = gr.Dropdown(label="Sampling method", choices=list(scheduler_dict.keys()), value=list(scheduler_dict.keys())[0])
274
+ sample_step_slider = gr.Slider(label="Sampling steps", value=50, minimum=10, maximum=250, step=1)
275
 
276
  with gr.Row():
277
  center_crop = gr.Checkbox(label="Center Crop the Image", value=True)
278
+ width_slider = gr.Slider(label="Width", value=256, minimum=0, maximum=512, step=64)
279
+ height_slider = gr.Slider(label="Height", value=256, minimum=0, maximum=512, step=64)
280
  with gr.Row():
281
  txt_cfg_scale_slider = gr.Slider(label="Text CFG Scale", value=7.5, minimum=1.0, maximum=20.0, step=0.5)
282
  img_cfg_scale_slider = gr.Slider(label="Image CFG Scale", value=1.0, minimum=1.0, maximum=20.0, step=0.5)