tonyassi commited on
Commit
363e716
Β·
verified Β·
1 Parent(s): 0f2cd7f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +32 -32
app.py CHANGED
@@ -78,30 +78,29 @@ def open_side(): # tiny helper
78
  CUSTOM_CSS = """
79
  .sticky-cta {
80
  position: sticky; top: 0; z-index: 1000;
81
- display: flex; align-items: center; justify-content: space-between;
82
- gap: 10px;
83
  background: #a5b4fc;
84
  color: #0f172a;
85
  padding: 10px 14px;
 
86
  border-bottom: 1px solid #333;
 
 
 
87
  }
88
- .sticky-cta a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; }
89
- .sticky-cta a:hover { filter: brightness(0.97); }
 
90
 
91
- .sticky-cta .pill {
92
- background:#4f46e5; color:#fff; padding:4px 10px; border-radius:999px; margin-left:10px;
93
- }
94
- .api-cta {
95
- background:#0ea5e9; color:#fff; padding:6px 12px; border-radius:999px;
96
- font-weight:700; border:1px solid rgba(255,255,255,0.25);
97
- }
98
- .api-cta:hover { filter: brightness(1.05); }
99
 
100
- /* (optional) tighten on small screens */
101
- @media (max-width: 520px) {
102
- .sticky-cta { padding: 8px 12px; }
103
- .sticky-cta .pill { display:none; }
 
 
104
  }
 
 
105
 
106
 
107
 
@@ -138,25 +137,14 @@ CUSTOM_CSS = """
138
  with gr.Blocks(title="Video Face Swap", theme=gr.themes.Soft(), css=CUSTOM_CSS) as demo:
139
  # Sticky banner
140
  gr.HTML(
141
- f"""
142
- <div class="sticky-cta" aria-label="Site actions">
143
- <a href="https://www.face-swap.co/?utm_source=hfspace_videofaceswap&utm_medium=banner"
144
- target="_blank" rel="noopener" aria-label="Upgrade to Pro on face-swap.co">
145
- ⚑ <strong>Upgrade to HD</strong> β€” priority queue & no duration limit!
146
- <span class="pill">GPU</span>
147
- </a>
148
-
149
- <a class="api-cta"
150
- href="https://www.face-swap.co/api?utm_source=hfspace_videofaceswap&utm_medium=sticky_api"
151
- target="_blank" rel="noopener" aria-label="Face Swap API">
152
- API
153
- </a>
154
- </div>
155
- """
156
  )
157
 
158
 
159
-
160
  gr.Markdown(
161
  f"""
162
  ### Video Face Swap (Preview)
@@ -168,6 +156,18 @@ with gr.Blocks(title="Video Face Swap", theme=gr.themes.Soft(), css=CUSTOM_CSS)
168
  elem_id="hero-md"
169
  )
170
 
 
 
 
 
 
 
 
 
 
 
 
 
171
 
172
  with gr.Row():
173
  with gr.Column(scale=5):
 
78
  CUSTOM_CSS = """
79
  .sticky-cta {
80
  position: sticky; top: 0; z-index: 1000;
 
 
81
  background: #a5b4fc;
82
  color: #0f172a;
83
  padding: 10px 14px;
84
+ text-align: center;
85
  border-bottom: 1px solid #333;
86
+ display: block; /* full-width clickable */
87
+ text-decoration: none; /* remove underline */
88
+ cursor: pointer;
89
  }
90
+ .sticky-cta:hover { filter: brightness(0.97); }
91
+ .sticky-cta .pill { background:#4f46e5; color:#fff; padding:4px 10px; border-radius:999px; margin-left:10px; }
92
+ .sticky-cta .cta-link { font-weight:600; text-decoration: underline; }
93
 
 
 
 
 
 
 
 
 
94
 
95
+ /* hero API chip */
96
+ .api-cta-hero {
97
+ display:inline-flex; align-items:center; justify-content:center;
98
+ gap:8px; padding:8px 14px; border-radius:999px;
99
+ background:#0ea5e9; color:#fff; font-weight:700; border:1px solid rgba(255,255,255,0.25);
100
+ box-shadow: 0 4px 14px rgba(14,165,233,0.25);
101
  }
102
+ .api-cta-hero:hover { filter: brightness(1.05); }
103
+ .api-cta-wrap { text-align:center; margin-top:8px; }
104
 
105
 
106
 
 
137
  with gr.Blocks(title="Video Face Swap", theme=gr.themes.Soft(), css=CUSTOM_CSS) as demo:
138
  # Sticky banner
139
  gr.HTML(
140
+ f"""<a class="sticky-cta" href="https://www.face-swap.co/?utm_source=hfspace_videofaceswap&utm_medium=banner" target="_blank" rel="noopener"
141
+ aria-label="Upgrade to Pro on face-swap.co">
142
+ ⚑ <strong>Upgrade to HD</strong> β€” priority queue & no duration limit!
143
+ <span class="pill">GPU</span>
144
+ </a>"""
 
 
 
 
 
 
 
 
 
 
145
  )
146
 
147
 
 
148
  gr.Markdown(
149
  f"""
150
  ### Video Face Swap (Preview)
 
156
  elem_id="hero-md"
157
  )
158
 
159
+ gr.HTML(
160
+ """
161
+ <div class="api-cta-wrap">
162
+ <a class="api-cta-hero"
163
+ href="https://www.face-swap.co/api?utm_source=hfspace_videofaceswap&utm_medium=hero_api"
164
+ target="_blank" rel="noopener" aria-label="Face Swap API">
165
+ API
166
+ </a>
167
+ </div>
168
+ """
169
+ )
170
+
171
 
172
  with gr.Row():
173
  with gr.Column(scale=5):