waroca commited on
Commit
f08bbbb
·
verified ·
1 Parent(s): ed513c5

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +32 -16
app.py CHANGED
@@ -25,26 +25,36 @@ def main():
25
  # Custom CSS for dataset cards
26
  custom_css = theme.css + """
27
  /* Hide any share buttons globally */
28
- .share-button, [class*="share"], button[title="Share"] {
 
 
 
 
29
  display: none !important;
30
  }
31
 
32
  /* Hero section styling */
33
  .hero-section {
34
- text-align: center;
35
- padding: 2rem 1rem 1rem;
 
 
 
 
 
 
 
 
36
  }
37
- .hero-logo-img {
38
- max-width: 220px;
39
- height: auto;
40
- margin: 0 auto 0.75rem;
41
- display: block;
42
  }
43
  .hero-subtitle {
44
  font-size: 1rem !important;
45
  color: var(--text-secondary, #98989d) !important;
46
- margin: 0 !important;
47
  font-weight: 400 !important;
 
48
  }
49
 
50
  /* Dataset card styling */
@@ -178,13 +188,19 @@ def main():
178
  # State to track logged-in username (triggers re-render when changed)
179
  logged_in_user = gr.State(value=None)
180
 
181
- # Hero Section with logo (using HTML to avoid Gradio image controls)
182
- gr.HTML('''
183
- <div class="hero-section">
184
- <img src="/file=datapass_logo.png" alt="DataPass" class="hero-logo-img">
185
- <p class="hero-subtitle">Your pass to private data.</p>
186
- </div>
187
- ''')
 
 
 
 
 
 
188
 
189
  # Simple auth row with Gradio 6 LoginButton
190
  with gr.Row():
 
25
  # Custom CSS for dataset cards
26
  custom_css = theme.css + """
27
  /* Hide any share buttons globally */
28
+ .share-button,
29
+ [class*="share"],
30
+ button[title="Share"],
31
+ .icon-buttons,
32
+ .image-button-group {
33
  display: none !important;
34
  }
35
 
36
  /* Hero section styling */
37
  .hero-section {
38
+ justify-content: center !important;
39
+ padding: 1.5rem 1rem 0.5rem !important;
40
+ background: transparent !important;
41
+ }
42
+ .hero-logo {
43
+ max-width: 200px !important;
44
+ background: transparent !important;
45
+ border: none !important;
46
+ box-shadow: none !important;
47
+ margin: 0 auto !important;
48
  }
49
+ .hero-logo img {
50
+ object-fit: contain !important;
 
 
 
51
  }
52
  .hero-subtitle {
53
  font-size: 1rem !important;
54
  color: var(--text-secondary, #98989d) !important;
55
+ margin: 0 0 1rem 0 !important;
56
  font-weight: 400 !important;
57
+ text-align: center !important;
58
  }
59
 
60
  /* Dataset card styling */
 
188
  # State to track logged-in username (triggers re-render when changed)
189
  logged_in_user = gr.State(value=None)
190
 
191
+ # Hero Section with logo
192
+ with gr.Row(elem_classes="hero-section"):
193
+ gr.Image(
194
+ value="datapass_logo.png",
195
+ show_label=False,
196
+ show_download_button=False,
197
+ show_fullscreen_button=False,
198
+ show_share_button=False,
199
+ container=False,
200
+ height=120,
201
+ elem_classes="hero-logo"
202
+ )
203
+ gr.HTML('<p class="hero-subtitle">Your pass to private data.</p>')
204
 
205
  # Simple auth row with Gradio 6 LoginButton
206
  with gr.Row():