trydrama-neuralgarage commited on
Commit
e7b6c3a
·
verified ·
1 Parent(s): 445f52b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +30 -1
app.py CHANGED
@@ -746,6 +746,11 @@ FAQ = [
746
  "make a real person appear to express something in order to deceive."),
747
  ]
748
 
 
 
 
 
 
749
  FEATURES = [
750
  ("AI smile generator",
751
  "Add a natural smile to a neutral face, or fix a smile that looks forced. Go from a subtle, "
@@ -933,6 +938,15 @@ CSS = """
933
  margin: 0 0 6px !important; }
934
  .gradio-container .dr-item span { font-size: 14px !important; color: var(--dr-muted) !important; line-height: 1.55 !important; }
935
 
 
 
 
 
 
 
 
 
 
936
  /* FAQ */
937
  .gradio-container .dr-faq { display: grid; border-top: 1px solid var(--dr-line); }
938
  .gradio-container .dr-faq details { border-bottom: 1px solid var(--dr-line); padding: 0 !important; margin: 0 !important;
@@ -969,6 +983,7 @@ CSS = """
969
  @media (max-width: 640px) {
970
  .gradio-container { padding: 0 16px 32px !important; }
971
  .gradio-container .dr-list { grid-template-columns: 1fr; }
 
972
  .gradio-container .dr-hero { padding: 40px 0 28px; }
973
  .gradio-container .dr-hero .dr-sub { font-size: 16px !important; }
974
  .gradio-container .dr-meta { gap: 4px 14px; }
@@ -1037,6 +1052,20 @@ with gr.Blocks(title=PAGE_TITLE) as demo:
1037
  <div class="dr-cta-btns"><a class="dr-btn" href="{DOCS}" target="_blank">API docs</a>
1038
  <a class="dr-btn dr-btn-primary" href="{SITE}" target="_blank">Try DRAMA Studio</a></div></div>""")
1039
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1040
  features = "".join(f'<div class="dr-item"><h3>{title}</h3><span>{text}</span></div>'
1041
  for title, text in FEATURES)
1042
  gr.HTML(f"""
@@ -1094,4 +1123,4 @@ def favicon_file():
1094
 
1095
  startup_check()
1096
  demo.queue(max_size=20).launch(theme=THEME, css=CSS, js=FORCE_DARK, head=HEAD,
1097
- favicon_path=favicon_file(), footer_links=[])
 
746
  "make a real person appear to express something in order to deceive."),
747
  ]
748
 
749
+ PROMO_VIDEOS = [ # YouTube video ID, accessible title
750
+ ("WYi2y1NOhhc", "DRAMA promo video 1"),
751
+ ("NngMqkyotx8", "DRAMA promo video 2"),
752
+ ]
753
+
754
  FEATURES = [
755
  ("AI smile generator",
756
  "Add a natural smile to a neutral face, or fix a smile that looks forced. Go from a subtle, "
 
938
  margin: 0 0 6px !important; }
939
  .gradio-container .dr-item span { font-size: 14px !important; color: var(--dr-muted) !important; line-height: 1.55 !important; }
940
 
941
+ /* promo videos */
942
+ .gradio-container .dr-center-head { text-align: center !important; max-width: 640px; margin: 0 auto 28px !important; }
943
+ .gradio-container .dr-center-head h2, .gradio-container .dr-center-head .dr-section-sub { text-align: center !important; }
944
+ .gradio-container .dr-videos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
945
+ .gradio-container .dr-video { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden;
946
+ border: 1px solid var(--dr-line); background: #000; }
947
+ .gradio-container .dr-video iframe { position: absolute; inset: 0; width: 100% !important; height: 100% !important;
948
+ border: 0 !important; }
949
+
950
  /* FAQ */
951
  .gradio-container .dr-faq { display: grid; border-top: 1px solid var(--dr-line); }
952
  .gradio-container .dr-faq details { border-bottom: 1px solid var(--dr-line); padding: 0 !important; margin: 0 !important;
 
983
  @media (max-width: 640px) {
984
  .gradio-container { padding: 0 16px 32px !important; }
985
  .gradio-container .dr-list { grid-template-columns: 1fr; }
986
+ .gradio-container .dr-videos { grid-template-columns: 1fr; }
987
  .gradio-container .dr-hero { padding: 40px 0 28px; }
988
  .gradio-container .dr-hero .dr-sub { font-size: 16px !important; }
989
  .gradio-container .dr-meta { gap: 4px 14px; }
 
1052
  <div class="dr-cta-btns"><a class="dr-btn" href="{DOCS}" target="_blank">API docs</a>
1053
  <a class="dr-btn dr-btn-primary" href="{SITE}" target="_blank">Try DRAMA Studio</a></div></div>""")
1054
 
1055
+ videos = "".join(
1056
+ f'<div class="dr-video"><iframe src="https://www.youtube-nocookie.com/embed/{vid}?rel=0&modestbranding=1" '
1057
+ f'title="{title}" loading="lazy" referrerpolicy="strict-origin-when-cross-origin" '
1058
+ f'allow="accelerometer; encrypted-media; gyroscope; picture-in-picture; fullscreen" allowfullscreen>'
1059
+ f'</iframe></div>'
1060
+ for vid, title in PROMO_VIDEOS)
1061
+ gr.HTML(f"""
1062
+ <section class="dr-section">
1063
+ <div class="dr-center-head"><div class="dr-kicker">In action</div>
1064
+ <h2>See DRAMA in action</h2>
1065
+ <div class="dr-section-sub">Watch how DRAMA changes the expression and keeps the rest of the take.</div></div>
1066
+ <div class="dr-videos">{videos}</div>
1067
+ </section>""")
1068
+
1069
  features = "".join(f'<div class="dr-item"><h3>{title}</h3><span>{text}</span></div>'
1070
  for title, text in FEATURES)
1071
  gr.HTML(f"""
 
1123
 
1124
  startup_check()
1125
  demo.queue(max_size=20).launch(theme=THEME, css=CSS, js=FORCE_DARK, head=HEAD,
1126
+ favicon_path=favicon_file(), footer_links=[])