liuhaotian commited on
Commit
3240762
1 Parent(s): 42dc9ff
Files changed (1) hide show
  1. app.py +20 -8
app.py CHANGED
@@ -496,9 +496,11 @@ css = """
496
  }
497
  #paper-info a {
498
  color:#008AD7;
 
499
  }
500
  #paper-info a:hover {
501
  cursor: pointer;
 
502
  }
503
  """
504
 
@@ -520,13 +522,23 @@ with Blocks(
520
  analytics_enabled=False,
521
  title="GLIGen demo",
522
  ) as main:
523
- gr.Markdown('<h1 style="text-align: center;">GLIGen: Open-Set Grounded Text-to-Image Generation</h1>')
524
- gr.Markdown("""<h3 style="text-align: center" id="paper-info">
525
- [<a href="https://gligen.github.io" target="_blank" style="">Project Page</a>]
526
- [<a href="https://arxiv.org/abs/2301.07093" target="_blank" style="">Paper</a>]
527
- [<a href="https://github.com/gligen/GLIGEN" target="_blank" style="">GitHub Repo</a>]
528
- </h3>""")
529
- gr.Markdown("To ground concepts of interest with desired spatial specification, please (1) &#9000;&#65039; enter the concept names in <em> Grounding Instruction</em>, and (2) &#128433;&#65039; draw their corresponding bounding boxes one by one using <em> Sketch Pad</em> -- the parsed boxes will be displayed automatically.")
 
 
 
 
 
 
 
 
 
 
530
  with gr.Row():
531
  with gr.Column(scale=4):
532
  sketch_pad_trigger = gr.Number(value=0, visible=False)
@@ -567,7 +579,7 @@ with Blocks(
567
  use_style_cond = gr.Checkbox(value=False, label="Enable Style Condition")
568
  style_cond_image = gr.Image(type="pil", label="Style Condition", visible=False, interactive=True)
569
  with gr.Column(scale=4):
570
- gr.Markdown("### Generated Images")
571
  with gr.Row():
572
  out_gen_1 = gr.Image(type="pil", visible=True, show_label=False)
573
  out_gen_2 = gr.Image(type="pil", visible=True, show_label=False)
 
496
  }
497
  #paper-info a {
498
  color:#008AD7;
499
+ text-decoration: none;
500
  }
501
  #paper-info a:hover {
502
  cursor: pointer;
503
+ text-decoration: none;
504
  }
505
  """
506
 
 
522
  analytics_enabled=False,
523
  title="GLIGen demo",
524
  ) as main:
525
+ description = """<p style="text-align: center; font-weight: bold;">
526
+ <span style="font-size: 28px">GLIGen: Open-Set Grounded Text-to-Image Generation</span>
527
+ <br>
528
+ <span style="font-size: 18px" id="paper-info">
529
+ [<a href="https://gligen.github.io" target="_blank">Project Page</a>]
530
+ [<a href="https://arxiv.org/abs/2301.07093" target="_blank">Paper</a>]
531
+ [<a href="https://github.com/gligen/GLIGEN" target="_blank">GitHub</a>]
532
+ </span>
533
+ </p>
534
+ <p>
535
+ To ground concepts of interest with desired spatial specification, please (1) &#9000;&#65039; enter the concept names in <em> Grounding Instruction</em>, and (2) &#128433;&#65039; draw their corresponding bounding boxes one by one using <em> Sketch Pad</em> -- the parsed boxes will be displayed automatically.
536
+ <br>
537
+ For faster inference without waiting in queue, you may duplicate the space and upgrade to GPU in settings. <a href="https://huggingface.co/spaces/gligen/demo?duplicate=true"><img style="display: inline; margin-top: 0em; margin-bottom: 0em" src="https://bit.ly/3gLdBN6" alt="Duplicate Space" /></a>
538
+ </p>
539
+ """
540
+ gr.HTML(description)
541
+
542
  with gr.Row():
543
  with gr.Column(scale=4):
544
  sketch_pad_trigger = gr.Number(value=0, visible=False)
 
579
  use_style_cond = gr.Checkbox(value=False, label="Enable Style Condition")
580
  style_cond_image = gr.Image(type="pil", label="Style Condition", visible=False, interactive=True)
581
  with gr.Column(scale=4):
582
+ gr.HTML('<span style="font-size: 20px; font-weight: bold">Generated Images</span>')
583
  with gr.Row():
584
  out_gen_1 = gr.Image(type="pil", visible=True, show_label=False)
585
  out_gen_2 = gr.Image(type="pil", visible=True, show_label=False)