Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
app.py
CHANGED
|
@@ -370,6 +370,54 @@ modern_css = """
|
|
| 370 |
color: #0c4a6e;
|
| 371 |
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
| 372 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 373 |
"""
|
| 374 |
|
| 375 |
# Create the interface with password protection
|
|
@@ -387,11 +435,13 @@ def create_interface():
|
|
| 387 |
|
| 388 |
# Login gate
|
| 389 |
with gr.Group(visible=True) as login_group:
|
| 390 |
-
gr.
|
| 391 |
-
|
| 392 |
-
|
| 393 |
-
|
| 394 |
-
|
|
|
|
|
|
|
| 395 |
|
| 396 |
# Main UI wrapped for toggling visibility
|
| 397 |
with gr.Group(visible=False) as main_group:
|
|
|
|
| 370 |
color: #0c4a6e;
|
| 371 |
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
| 372 |
}
|
| 373 |
+
|
| 374 |
+
/* Login styling */
|
| 375 |
+
.login-wrapper {
|
| 376 |
+
display: flex;
|
| 377 |
+
align-items: center;
|
| 378 |
+
justify-content: center;
|
| 379 |
+
min-height: 60vh;
|
| 380 |
+
}
|
| 381 |
+
|
| 382 |
+
.login-card {
|
| 383 |
+
max-width: 480px;
|
| 384 |
+
width: 100%;
|
| 385 |
+
background: #ffffff;
|
| 386 |
+
border: 1px solid #e5e7eb;
|
| 387 |
+
border-radius: 16px;
|
| 388 |
+
padding: 24px;
|
| 389 |
+
box-shadow: 0 10px 25px rgba(0,0,0,0.08);
|
| 390 |
+
}
|
| 391 |
+
|
| 392 |
+
.login-title {
|
| 393 |
+
text-align: center;
|
| 394 |
+
margin: 0 0 6px 0;
|
| 395 |
+
font-size: 22px;
|
| 396 |
+
font-weight: 700;
|
| 397 |
+
color: #111827;
|
| 398 |
+
}
|
| 399 |
+
|
| 400 |
+
.login-subtitle {
|
| 401 |
+
text-align: center;
|
| 402 |
+
margin: 0 0 16px 0;
|
| 403 |
+
font-size: 14px;
|
| 404 |
+
color: #6b7280;
|
| 405 |
+
}
|
| 406 |
+
|
| 407 |
+
.login-input {
|
| 408 |
+
background: #f9fafb !important;
|
| 409 |
+
border: 2px solid #e5e7eb !important;
|
| 410 |
+
border-radius: 10px !important;
|
| 411 |
+
padding: 12px !important;
|
| 412 |
+
}
|
| 413 |
+
|
| 414 |
+
.login-error {
|
| 415 |
+
color: #b91c1c;
|
| 416 |
+
background: #fee2e2;
|
| 417 |
+
border: 1px solid #fecaca;
|
| 418 |
+
padding: 10px 12px;
|
| 419 |
+
border-radius: 10px;
|
| 420 |
+
}
|
| 421 |
"""
|
| 422 |
|
| 423 |
# Create the interface with password protection
|
|
|
|
| 435 |
|
| 436 |
# Login gate
|
| 437 |
with gr.Group(visible=True) as login_group:
|
| 438 |
+
gr.HTML('<div class="login-wrapper"><div class="login-card">')
|
| 439 |
+
gr.HTML('<div class="login-title">🔐 Private Access</div>')
|
| 440 |
+
gr.HTML('<div class="login-subtitle">Enter the shared password to continue</div>')
|
| 441 |
+
pw = gr.Textbox(label="Password", type="password", placeholder="Enter password", elem_classes=["login-input"])
|
| 442 |
+
login_btn = gr.Button("Continue", elem_classes=["modern-button"])
|
| 443 |
+
login_error = gr.Markdown(visible=False, elem_classes=["login-error"])
|
| 444 |
+
gr.HTML('</div></div>')
|
| 445 |
|
| 446 |
# Main UI wrapped for toggling visibility
|
| 447 |
with gr.Group(visible=False) as main_group:
|