Pusheen commited on
Commit
8ecf30b
1 Parent(s): de70f3d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -10
app.py CHANGED
@@ -546,7 +546,7 @@ function(x) {
546
  return x;
547
  }
548
  """
549
- # [<a href="https://arxiv.org/abs/2301.07093" target="_blank">Paper</a>]
550
  with Blocks(
551
  css=css,
552
  analytics_enabled=False,
@@ -598,6 +598,7 @@ with Blocks(
598
  with gr.Row():
599
  sketch_pad = ImageMask(label="Sketch Pad", elem_id="img2img_image")
600
  out_imagebox = gr.Image(type="pil",elem_id="my_image" ,label="Parsed Sketch Pad", shape=(512,512))
 
601
  with gr.Row():
602
  clear_btn = gr.Button(value='Clear')
603
  gen_btn = gr.Button(value='Generate')
@@ -607,7 +608,7 @@ with Blocks(
607
  with gr.Accordion("Advanced Options", open=False):
608
  with gr.Column():
609
  alpha_sample = gr.Slider(minimum=0, maximum=1.0, step=0.1, value=0.3, label="Scheduled Sampling (τ)")
610
- guidance_scale = gr.Slider(minimum=0, maximum=50, step=0.5, value=7.5, label="Guidance Scale")
611
  batch_size = gr.Slider(minimum=1, maximum=4,visible=False, step=1, value=1, label="Number of Samples")
612
  append_grounding = gr.Checkbox(value=True, label="Append grounding instructions to the caption")
613
  use_actual_mask = gr.Checkbox(value=False, label="Use actual mask for inpainting", visible=False)
@@ -618,14 +619,14 @@ with Blocks(
618
  with gr.Row():
619
  use_style_cond = gr.Checkbox(value=False,visible=False, label="Enable Style Condition")
620
  style_cond_image = gr.Image(type="pil",visible=False, label="Style Condition", interactive=True)
621
- with gr.Column(scale=4):
622
- gr.HTML('<span style="font-size: 20px; font-weight: bold">Generated Images</span>')
623
- with gr.Row():
624
- out_gen_1 = gr.Image(type="pil", visible=True, show_label=False)
625
- out_gen_2 = gr.Image(type="pil", visible=False, show_label=False)
626
- with gr.Row():
627
- out_gen_3 = gr.Image(type="pil", visible=False, show_label=False)
628
- out_gen_4 = gr.Image(type="pil", visible=False, show_label=False)
629
 
630
  state = gr.State({})
631
 
 
546
  return x;
547
  }
548
  """
549
+
550
  with Blocks(
551
  css=css,
552
  analytics_enabled=False,
 
598
  with gr.Row():
599
  sketch_pad = ImageMask(label="Sketch Pad", elem_id="img2img_image")
600
  out_imagebox = gr.Image(type="pil",elem_id="my_image" ,label="Parsed Sketch Pad", shape=(512,512))
601
+ out_gen_1 = gr.Image(type="pil", visible=True, show_label=False)
602
  with gr.Row():
603
  clear_btn = gr.Button(value='Clear')
604
  gen_btn = gr.Button(value='Generate')
 
608
  with gr.Accordion("Advanced Options", open=False):
609
  with gr.Column():
610
  alpha_sample = gr.Slider(minimum=0, maximum=1.0, step=0.1, value=0.3, label="Scheduled Sampling (τ)")
611
+ guidance_scale = gr.Slider(minimum=0, maximum=50, step=0.5, value=7.5, label="CFG Guidance Scale")
612
  batch_size = gr.Slider(minimum=1, maximum=4,visible=False, step=1, value=1, label="Number of Samples")
613
  append_grounding = gr.Checkbox(value=True, label="Append grounding instructions to the caption")
614
  use_actual_mask = gr.Checkbox(value=False, label="Use actual mask for inpainting", visible=False)
 
619
  with gr.Row():
620
  use_style_cond = gr.Checkbox(value=False,visible=False, label="Enable Style Condition")
621
  style_cond_image = gr.Image(type="pil",visible=False, label="Style Condition", interactive=True)
622
+ # with gr.Column(scale=4):
623
+ # gr.HTML('<span style="font-size: 20px; font-weight: bold">Generated Images</span>')
624
+ # with gr.Row():
625
+ # out_gen_1 = gr.Image(type="pil", visible=True, show_label=False)
626
+ # out_gen_2 = gr.Image(type="pil", visible=False, show_label=False)
627
+ # with gr.Row():
628
+ # out_gen_3 = gr.Image(type="pil", visible=False, show_label=False)
629
+ # out_gen_4 = gr.Image(type="pil", visible=False, show_label=False)
630
 
631
  state = gr.State({})
632