OpceanAI commited on
Commit
53e66a6
Β·
verified Β·
1 Parent(s): 1addc19

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +56 -32
app.py CHANGED
@@ -430,11 +430,6 @@ body::after {
430
  position: relative;
431
  }
432
 
433
- .chat-section > .gradio-row,
434
- .chat-section > .gradio-column {
435
- position: relative;
436
- }
437
-
438
  .chat-container {
439
  border-radius: var(--radius-xl);
440
  background: var(--bg-glass);
@@ -475,15 +470,44 @@ body::after {
475
  margin-left: auto;
476
  }
477
 
478
- /* ─── Auth Login Button ───────────────────────────────────────────────────── */
479
- .auth-login-btn {
 
 
 
 
 
 
 
 
 
 
480
  width: 100% !important;
481
- margin-bottom: 16px !important;
482
- padding: 10px 16px !important;
483
- height: 42px !important;
484
- background: var(--bg-card) !important;
 
 
 
 
485
  color: var(--text-primary) !important;
486
- border: 1px solid var(--border-primary) !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
487
  border-radius: var(--radius-md) !important;
488
  font-family: var(--font-sans) !important;
489
  font-size: 13px !important;
@@ -492,9 +516,8 @@ body::after {
492
  transition: all var(--transition-fast) !important;
493
  }
494
 
495
- .auth-login-btn:hover {
496
- background: var(--bg-card-hover) !important;
497
- border-color: var(--border-secondary) !important;
498
  transform: translateY(-1px) !important;
499
  }
500
 
@@ -711,6 +734,12 @@ footer, .footer, .built-with { display: none !important; }
711
  .features { padding: 24px 16px 40px; }
712
  .chat-section { padding: 24px 16px 60px; }
713
  .message { max-width: 90% !important; }
 
 
 
 
 
 
714
  }
715
 
716
  /* ─── Reduced Motion ───────────────────────────────────────────────────────── */
@@ -1075,24 +1104,19 @@ with gr.Blocks(
1075
  """)
1076
 
1077
  # ─── Chat Section ─────────────────────────────────────────────────────
1078
- login_btn = gr.LoginButton("Iniciar sesiΓ³n con Hugging Face", elem_classes="auth-login-btn")
1079
-
1080
- with gr.Column(elem_classes="chat-section"):
1081
- gr.HTML("""
1082
- <div class="chat-container" id="chat">
1083
- <div class="chat-header">
1084
- <span class="chat-header-dot"></span>
1085
- <h3>Chat con Yuuki-RxG</h3>
1086
- <span>Featherless AI</span>
1087
- </div>
1088
- </div>
1089
- """)
1090
-
1091
- gr.load(
1092
- "models/OpceanAI/Yuuki-RxG",
1093
- accept_token=login_btn,
1094
- provider="featherless-ai",
1095
  )
 
 
 
 
 
 
 
1096
 
1097
  # ─── Footer ───────────────────────────────────────────────────────────
1098
  gr.HTML("""
 
430
  position: relative;
431
  }
432
 
 
 
 
 
 
433
  .chat-container {
434
  border-radius: var(--radius-xl);
435
  background: var(--bg-glass);
 
470
  margin-left: auto;
471
  }
472
 
473
+ /* ─── Sidebar (inline, not full-page) ─────────────────────────────────────── */
474
+ .gradio-container .sidebar,
475
+ .gradio-container aside {
476
+ background: var(--bg-glass-strong) !important;
477
+ backdrop-filter: blur(var(--blur-lg)) !important;
478
+ -webkit-backdrop-filter: blur(var(--blur-lg)) !important;
479
+ border: 1px solid var(--border-primary) !important;
480
+ border-radius: var(--radius-lg) !important;
481
+ padding: 20px !important;
482
+ margin: 0 auto 24px !important;
483
+ max-width: 400px !important;
484
+ min-width: auto !important;
485
  width: 100% !important;
486
+ box-shadow: var(--shadow-md) !important;
487
+ }
488
+
489
+ .sidebar h1, aside h1 {
490
+ font-family: var(--font-sans) !important;
491
+ font-size: 18px !important;
492
+ font-weight: 700 !important;
493
+ letter-spacing: -0.03em !important;
494
  color: var(--text-primary) !important;
495
+ margin-bottom: 8px !important;
496
+ }
497
+
498
+ .sidebar p, aside p {
499
+ font-size: 13px !important;
500
+ color: var(--text-secondary) !important;
501
+ line-height: 1.6 !important;
502
+ }
503
+
504
+ .sidebar button, aside button {
505
+ margin-top: 12px !important;
506
+ padding: 10px 16px !important;
507
+ height: 40px !important;
508
+ background: var(--text-primary) !important;
509
+ color: var(--text-inverse) !important;
510
+ border: none !important;
511
  border-radius: var(--radius-md) !important;
512
  font-family: var(--font-sans) !important;
513
  font-size: 13px !important;
 
516
  transition: all var(--transition-fast) !important;
517
  }
518
 
519
+ .sidebar button:hover, aside button:hover {
520
+ opacity: 0.85 !important;
 
521
  transform: translateY(-1px) !important;
522
  }
523
 
 
734
  .features { padding: 24px 16px 40px; }
735
  .chat-section { padding: 24px 16px 60px; }
736
  .message { max-width: 90% !important; }
737
+
738
+ .gradio-container .sidebar,
739
+ .gradio-container aside {
740
+ max-width: 100% !important;
741
+ margin: 0 0 16px !important;
742
+ }
743
  }
744
 
745
  /* ─── Reduced Motion ───────────────────────────────────────────────────────── */
 
1104
  """)
1105
 
1106
  # ─── Chat Section ─────────────────────────────────────────────────────
1107
+ with gr.Sidebar():
1108
+ gr.Markdown("# Yuuki-RxG")
1109
+ gr.Markdown(
1110
+ "Modelo servido via featherless-ai. "
1111
+ "Inicia sesiΓ³n con tu cuenta de Hugging Face para acceder a la inferencia."
 
 
 
 
 
 
 
 
 
 
 
 
1112
  )
1113
+ login_btn = gr.LoginButton("Iniciar sesiΓ³n")
1114
+
1115
+ gr.load(
1116
+ "models/OpceanAI/Yuuki-RxG",
1117
+ accept_token=login_btn,
1118
+ provider="featherless-ai",
1119
+ )
1120
 
1121
  # ─── Footer ───────────────────────────────────────────────────────────
1122
  gr.HTML("""