Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- app.py +91 -35
- datapass_logo.png +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
datapass_logo.png filter=lfs diff=lfs merge=lfs -text
|
app.py
CHANGED
|
@@ -24,22 +24,45 @@ print("========================================")
|
|
| 24 |
def main():
|
| 25 |
# Custom CSS for dataset cards
|
| 26 |
custom_css = theme.css + """
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
/* Dataset card styling */
|
| 28 |
.dataset-card-group {
|
| 29 |
background: var(--bg-card, #1c1c1e) !important;
|
| 30 |
-
border: 1px solid var(--border-color, rgba(255,255,255,0.
|
| 31 |
-
border-radius:
|
| 32 |
-
padding: 1.
|
| 33 |
margin-bottom: 1rem !important;
|
| 34 |
-
transition: all 0.
|
|
|
|
| 35 |
}
|
| 36 |
.dataset-card-group:hover {
|
| 37 |
-
border-color:
|
| 38 |
-
box-shadow: 0
|
|
|
|
| 39 |
}
|
|
|
|
|
|
|
| 40 |
.card-header-row {
|
| 41 |
-
margin-bottom: 0.
|
| 42 |
-
gap:
|
|
|
|
| 43 |
}
|
| 44 |
.card-title-col {
|
| 45 |
min-width: 0 !important;
|
|
@@ -49,54 +72,83 @@ def main():
|
|
| 49 |
min-width: auto !important;
|
| 50 |
}
|
| 51 |
.dataset-title {
|
| 52 |
-
font-size: 1.
|
| 53 |
-
font-weight:
|
| 54 |
margin: 0 !important;
|
| 55 |
color: var(--text-primary, #f5f5f7) !important;
|
| 56 |
line-height: 1.3 !important;
|
|
|
|
| 57 |
}
|
| 58 |
.dataset-id {
|
| 59 |
font-size: 0.75rem !important;
|
| 60 |
color: var(--text-tertiary, #6e6e73) !important;
|
| 61 |
-
margin: 0.
|
| 62 |
font-family: 'SF Mono', Monaco, monospace !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
}
|
| 64 |
.dataset-desc {
|
| 65 |
-
font-size: 0.
|
| 66 |
color: var(--text-secondary, #a1a1a6) !important;
|
| 67 |
-
line-height: 1.
|
| 68 |
-
margin: 0 0
|
| 69 |
}
|
|
|
|
|
|
|
| 70 |
.price-badge {
|
| 71 |
-
display: inline-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
|
|
|
| 75 |
font-weight: 600 !important;
|
| 76 |
}
|
| 77 |
.price-badge.paid {
|
| 78 |
-
background:
|
| 79 |
color: var(--text-primary, #f5f5f7) !important;
|
|
|
|
| 80 |
}
|
| 81 |
.price-badge.free {
|
| 82 |
-
background: rgba(52, 199, 89, 0.
|
| 83 |
color: #34c759 !important;
|
|
|
|
| 84 |
}
|
|
|
|
|
|
|
| 85 |
.card-footer-row {
|
| 86 |
-
padding-top:
|
| 87 |
-
border-top: 1px solid
|
| 88 |
-
gap:
|
| 89 |
align-items: center !important;
|
| 90 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
.login-hint {
|
| 92 |
-
font-size: 0.
|
| 93 |
color: var(--text-tertiary, #6e6e73) !important;
|
| 94 |
font-style: italic !important;
|
| 95 |
margin: 0 !important;
|
| 96 |
-
|
| 97 |
-
/* Make buttons fill available space in cards */
|
| 98 |
-
.card-footer-row .gr-button {
|
| 99 |
-
min-width: 140px !important;
|
| 100 |
}
|
| 101 |
"""
|
| 102 |
|
|
@@ -104,13 +156,17 @@ def main():
|
|
| 104 |
# State to track logged-in username (triggers re-render when changed)
|
| 105 |
logged_in_user = gr.State(value=None)
|
| 106 |
|
| 107 |
-
# Hero Section
|
| 108 |
-
gr.
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 114 |
|
| 115 |
# Simple auth row with Gradio 6 LoginButton
|
| 116 |
with gr.Row():
|
|
|
|
| 24 |
def main():
|
| 25 |
# Custom CSS for dataset cards
|
| 26 |
custom_css = theme.css + """
|
| 27 |
+
/* Hero logo styling */
|
| 28 |
+
.hero-logo {
|
| 29 |
+
max-width: 280px !important;
|
| 30 |
+
margin: 1.5rem auto 0.5rem !important;
|
| 31 |
+
background: transparent !important;
|
| 32 |
+
border: none !important;
|
| 33 |
+
box-shadow: none !important;
|
| 34 |
+
}
|
| 35 |
+
.hero-logo img {
|
| 36 |
+
object-fit: contain !important;
|
| 37 |
+
}
|
| 38 |
+
.hero-subtitle {
|
| 39 |
+
font-size: 1.125rem !important;
|
| 40 |
+
color: var(--text-secondary, #a1a1a6) !important;
|
| 41 |
+
margin: 0 auto 1rem !important;
|
| 42 |
+
text-align: center !important;
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
/* Dataset card styling */
|
| 46 |
.dataset-card-group {
|
| 47 |
background: var(--bg-card, #1c1c1e) !important;
|
| 48 |
+
border: 1px solid var(--border-color, rgba(255,255,255,0.1)) !important;
|
| 49 |
+
border-radius: 20px !important;
|
| 50 |
+
padding: 1.5rem !important;
|
| 51 |
margin-bottom: 1rem !important;
|
| 52 |
+
transition: all 0.25s ease !important;
|
| 53 |
+
overflow: hidden !important;
|
| 54 |
}
|
| 55 |
.dataset-card-group:hover {
|
| 56 |
+
border-color: rgba(255,255,255,0.2) !important;
|
| 57 |
+
box-shadow: 0 8px 32px rgba(0,0,0,0.2) !important;
|
| 58 |
+
transform: translateY(-2px) !important;
|
| 59 |
}
|
| 60 |
+
|
| 61 |
+
/* Card header */
|
| 62 |
.card-header-row {
|
| 63 |
+
margin-bottom: 0.75rem !important;
|
| 64 |
+
gap: 1rem !important;
|
| 65 |
+
align-items: flex-start !important;
|
| 66 |
}
|
| 67 |
.card-title-col {
|
| 68 |
min-width: 0 !important;
|
|
|
|
| 72 |
min-width: auto !important;
|
| 73 |
}
|
| 74 |
.dataset-title {
|
| 75 |
+
font-size: 1.25rem !important;
|
| 76 |
+
font-weight: 700 !important;
|
| 77 |
margin: 0 !important;
|
| 78 |
color: var(--text-primary, #f5f5f7) !important;
|
| 79 |
line-height: 1.3 !important;
|
| 80 |
+
letter-spacing: -0.01em !important;
|
| 81 |
}
|
| 82 |
.dataset-id {
|
| 83 |
font-size: 0.75rem !important;
|
| 84 |
color: var(--text-tertiary, #6e6e73) !important;
|
| 85 |
+
margin: 0.375rem 0 0 0 !important;
|
| 86 |
font-family: 'SF Mono', Monaco, monospace !important;
|
| 87 |
+
background: rgba(255,255,255,0.05) !important;
|
| 88 |
+
padding: 0.2rem 0.5rem !important;
|
| 89 |
+
border-radius: 4px !important;
|
| 90 |
+
display: inline-block !important;
|
| 91 |
}
|
| 92 |
.dataset-desc {
|
| 93 |
+
font-size: 0.9375rem !important;
|
| 94 |
color: var(--text-secondary, #a1a1a6) !important;
|
| 95 |
+
line-height: 1.6 !important;
|
| 96 |
+
margin: 0 0 1.25rem 0 !important;
|
| 97 |
}
|
| 98 |
+
|
| 99 |
+
/* Price badges */
|
| 100 |
.price-badge {
|
| 101 |
+
display: inline-flex !important;
|
| 102 |
+
align-items: center !important;
|
| 103 |
+
padding: 0.5rem 1rem !important;
|
| 104 |
+
border-radius: 24px !important;
|
| 105 |
+
font-size: 0.9375rem !important;
|
| 106 |
font-weight: 600 !important;
|
| 107 |
}
|
| 108 |
.price-badge.paid {
|
| 109 |
+
background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%) !important;
|
| 110 |
color: var(--text-primary, #f5f5f7) !important;
|
| 111 |
+
border: 1px solid rgba(255,255,255,0.1) !important;
|
| 112 |
}
|
| 113 |
.price-badge.free {
|
| 114 |
+
background: linear-gradient(135deg, rgba(52, 199, 89, 0.2) 0%, rgba(52, 199, 89, 0.1) 100%) !important;
|
| 115 |
color: #34c759 !important;
|
| 116 |
+
border: 1px solid rgba(52, 199, 89, 0.3) !important;
|
| 117 |
}
|
| 118 |
+
|
| 119 |
+
/* Card footer */
|
| 120 |
.card-footer-row {
|
| 121 |
+
padding-top: 1rem !important;
|
| 122 |
+
border-top: 1px solid rgba(255,255,255,0.08) !important;
|
| 123 |
+
gap: 1rem !important;
|
| 124 |
align-items: center !important;
|
| 125 |
}
|
| 126 |
+
|
| 127 |
+
/* Subscribe buttons */
|
| 128 |
+
.dataset-card-group .gr-button-primary {
|
| 129 |
+
background: linear-gradient(135deg, #f5c842 0%, #d4a832 100%) !important;
|
| 130 |
+
color: #1a1a1a !important;
|
| 131 |
+
border: none !important;
|
| 132 |
+
border-radius: 12px !important;
|
| 133 |
+
padding: 0.75rem 1.5rem !important;
|
| 134 |
+
font-weight: 600 !important;
|
| 135 |
+
font-size: 0.9375rem !important;
|
| 136 |
+
transition: all 0.2s ease !important;
|
| 137 |
+
box-shadow: 0 2px 8px rgba(245, 200, 66, 0.3) !important;
|
| 138 |
+
}
|
| 139 |
+
.dataset-card-group .gr-button-primary:hover {
|
| 140 |
+
background: linear-gradient(135deg, #ffd54f 0%, #f5c842 100%) !important;
|
| 141 |
+
box-shadow: 0 4px 16px rgba(245, 200, 66, 0.4) !important;
|
| 142 |
+
transform: translateY(-1px) !important;
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
+
/* Login hint */
|
| 146 |
.login-hint {
|
| 147 |
+
font-size: 0.875rem !important;
|
| 148 |
color: var(--text-tertiary, #6e6e73) !important;
|
| 149 |
font-style: italic !important;
|
| 150 |
margin: 0 !important;
|
| 151 |
+
padding: 0.5rem 0 !important;
|
|
|
|
|
|
|
|
|
|
| 152 |
}
|
| 153 |
"""
|
| 154 |
|
|
|
|
| 156 |
# State to track logged-in username (triggers re-render when changed)
|
| 157 |
logged_in_user = gr.State(value=None)
|
| 158 |
|
| 159 |
+
# Hero Section with logo
|
| 160 |
+
gr.Image(
|
| 161 |
+
value="datapass_logo.png",
|
| 162 |
+
show_label=False,
|
| 163 |
+
show_download_button=False,
|
| 164 |
+
show_fullscreen_button=False,
|
| 165 |
+
container=False,
|
| 166 |
+
height=140,
|
| 167 |
+
elem_classes="hero-logo"
|
| 168 |
+
)
|
| 169 |
+
gr.HTML('<p class="hero-subtitle">Your pass to private data.</p>')
|
| 170 |
|
| 171 |
# Simple auth row with Gradio 6 LoginButton
|
| 172 |
with gr.Row():
|
datapass_logo.png
ADDED
|
Git LFS Details
|