Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -475,53 +475,70 @@ body::after {
|
|
| 475 |
margin-left: auto;
|
| 476 |
}
|
| 477 |
|
| 478 |
-
/* βββ
|
| 479 |
-
.
|
| 480 |
-
|
| 481 |
-
background: var(--bg-glass-strong) !important;
|
| 482 |
-
backdrop-filter: blur(var(--blur-lg)) !important;
|
| 483 |
-
-webkit-backdrop-filter: blur(var(--blur-lg)) !important;
|
| 484 |
-
border-right: 1px solid var(--border-primary) !important;
|
| 485 |
-
padding: 80px 20px 24px !important;
|
| 486 |
-
min-width: 220px !important;
|
| 487 |
-
max-width: 240px !important;
|
| 488 |
}
|
| 489 |
|
| 490 |
-
.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 491 |
font-family: var(--font-sans) !important;
|
| 492 |
-
font-size:
|
| 493 |
-
font-weight:
|
| 494 |
-
letter-spacing: -0.
|
| 495 |
color: var(--text-primary) !important;
|
| 496 |
-
|
| 497 |
}
|
| 498 |
|
| 499 |
-
.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 500 |
font-size: 12px !important;
|
| 501 |
color: var(--text-secondary) !important;
|
| 502 |
-
|
| 503 |
}
|
| 504 |
|
| 505 |
-
.
|
| 506 |
-
|
| 507 |
-
padding:
|
| 508 |
-
height:
|
| 509 |
-
background: var(--
|
| 510 |
-
color: var(--text-
|
| 511 |
-
border:
|
| 512 |
border-radius: var(--radius-md) !important;
|
| 513 |
font-family: var(--font-sans) !important;
|
| 514 |
-
font-size:
|
| 515 |
-
font-weight:
|
| 516 |
cursor: pointer !important;
|
| 517 |
transition: all var(--transition-fast) !important;
|
| 518 |
}
|
| 519 |
|
| 520 |
-
.
|
| 521 |
-
|
| 522 |
-
|
| 523 |
}
|
| 524 |
|
|
|
|
|
|
|
| 525 |
.chatbot,
|
| 526 |
div[data-testid="chatbot"] {
|
| 527 |
background: transparent !important;
|
|
@@ -732,25 +749,6 @@ footer, .footer, .built-with { display: none !important; }
|
|
| 732 |
.hero p { font-size: 15px; }
|
| 733 |
.features { padding: 24px 16px 40px; }
|
| 734 |
.chat-section { padding: 24px 16px 60px; }
|
| 735 |
-
|
| 736 |
-
.gradio-container .sidebar,
|
| 737 |
-
.gradio-container aside {
|
| 738 |
-
position: fixed !important;
|
| 739 |
-
top: 0 !important;
|
| 740 |
-
left: 0 !important;
|
| 741 |
-
bottom: 0 !important;
|
| 742 |
-
width: 280px !important;
|
| 743 |
-
max-width: 80vw !important;
|
| 744 |
-
z-index: 999 !important;
|
| 745 |
-
transform: translateX(-100%) !important;
|
| 746 |
-
transition: transform var(--transition-base) !important;
|
| 747 |
-
}
|
| 748 |
-
|
| 749 |
-
.gradio-container .sidebar.open,
|
| 750 |
-
.gradio-container aside.open {
|
| 751 |
-
transform: translateX(0) !important;
|
| 752 |
-
}
|
| 753 |
-
|
| 754 |
.message { max-width: 90% !important; }
|
| 755 |
}
|
| 756 |
|
|
@@ -1127,8 +1125,15 @@ with gr.Blocks(
|
|
| 1127 |
</div>
|
| 1128 |
""")
|
| 1129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1130 |
gr.load(
|
| 1131 |
"models/OpceanAI/Yuuki-RxG",
|
|
|
|
| 1132 |
provider="featherless-ai",
|
| 1133 |
)
|
| 1134 |
|
|
|
|
| 475 |
margin-left: auto;
|
| 476 |
}
|
| 477 |
|
| 478 |
+
/* βββ Auth Accordion ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */
|
| 479 |
+
.auth-accordion {
|
| 480 |
+
margin-bottom: 16px !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 481 |
}
|
| 482 |
|
| 483 |
+
.auth-accordion .label-wrap {
|
| 484 |
+
background: var(--bg-card) !important;
|
| 485 |
+
border: 1px solid var(--border-primary) !important;
|
| 486 |
+
border-radius: var(--radius-md) !important;
|
| 487 |
+
padding: 12px 16px !important;
|
| 488 |
+
cursor: pointer !important;
|
| 489 |
+
transition: all var(--transition-fast) !important;
|
| 490 |
+
}
|
| 491 |
+
|
| 492 |
+
.auth-accordion .label-wrap:hover {
|
| 493 |
+
border-color: var(--border-secondary) !important;
|
| 494 |
+
background: var(--bg-card-hover) !important;
|
| 495 |
+
}
|
| 496 |
+
|
| 497 |
+
.auth-accordion .label-wrap span {
|
| 498 |
font-family: var(--font-sans) !important;
|
| 499 |
+
font-size: 13px !important;
|
| 500 |
+
font-weight: 600 !important;
|
| 501 |
+
letter-spacing: -0.01em !important;
|
| 502 |
color: var(--text-primary) !important;
|
| 503 |
+
text-transform: none !important;
|
| 504 |
}
|
| 505 |
|
| 506 |
+
.auth-accordion .wrap {
|
| 507 |
+
background: var(--bg-glass) !important;
|
| 508 |
+
border: 1px solid var(--border-primary) !important;
|
| 509 |
+
border-top: none !important;
|
| 510 |
+
border-radius: 0 0 var(--radius-md) var(--radius-md) !important;
|
| 511 |
+
padding: 16px !important;
|
| 512 |
+
}
|
| 513 |
+
|
| 514 |
+
.auth-accordion .wrap p {
|
| 515 |
font-size: 12px !important;
|
| 516 |
color: var(--text-secondary) !important;
|
| 517 |
+
margin-bottom: 12px !important;
|
| 518 |
}
|
| 519 |
|
| 520 |
+
.auth-accordion button {
|
| 521 |
+
width: 100% !important;
|
| 522 |
+
padding: 10px 16px !important;
|
| 523 |
+
height: 40px !important;
|
| 524 |
+
background: var(--text-primary) !important;
|
| 525 |
+
color: var(--text-inverse) !important;
|
| 526 |
+
border: none !important;
|
| 527 |
border-radius: var(--radius-md) !important;
|
| 528 |
font-family: var(--font-sans) !important;
|
| 529 |
+
font-size: 13px !important;
|
| 530 |
+
font-weight: 600 !important;
|
| 531 |
cursor: pointer !important;
|
| 532 |
transition: all var(--transition-fast) !important;
|
| 533 |
}
|
| 534 |
|
| 535 |
+
.auth-accordion button:hover {
|
| 536 |
+
opacity: 0.85 !important;
|
| 537 |
+
transform: translateY(-1px) !important;
|
| 538 |
}
|
| 539 |
|
| 540 |
+
/* βββ Gradio Overrides βββββββββββββββββββββββββββββββββββββββββββββββββββββββ */
|
| 541 |
+
|
| 542 |
.chatbot,
|
| 543 |
div[data-testid="chatbot"] {
|
| 544 |
background: transparent !important;
|
|
|
|
| 749 |
.hero p { font-size: 15px; }
|
| 750 |
.features { padding: 24px 16px 40px; }
|
| 751 |
.chat-section { padding: 24px 16px 60px; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 752 |
.message { max-width: 90% !important; }
|
| 753 |
}
|
| 754 |
|
|
|
|
| 1125 |
</div>
|
| 1126 |
""")
|
| 1127 |
|
| 1128 |
+
with gr.Accordion("AutenticaciΓ³n", open=False, elem_classes="auth-accordion"):
|
| 1129 |
+
gr.Markdown(
|
| 1130 |
+
"Inicia sesiΓ³n con tu cuenta de **Hugging Face** para acceder a la inferencia del modelo."
|
| 1131 |
+
)
|
| 1132 |
+
login_btn = gr.LoginButton("Iniciar sesiΓ³n con Hugging Face")
|
| 1133 |
+
|
| 1134 |
gr.load(
|
| 1135 |
"models/OpceanAI/Yuuki-RxG",
|
| 1136 |
+
accept_token=login_btn,
|
| 1137 |
provider="featherless-ai",
|
| 1138 |
)
|
| 1139 |
|