OpceanAI commited on
Commit
4a0396b
·
verified ·
1 Parent(s): c5db499

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +96 -9
app.py CHANGED
@@ -250,11 +250,65 @@ body::after {
250
  .hero {
251
  padding: 120px 24px 60px;
252
  text-align: center;
253
- max-width: 800px;
254
  margin: 0 auto;
255
  position: relative;
256
  }
257
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
258
  .hero-badge {
259
  display: inline-flex;
260
  align-items: center;
@@ -716,7 +770,8 @@ footer, .footer, .built-with { display: none !important; }
716
  /* ─── Animations (anime.js handles all) ────────────────────────────────────── */
717
  .hero { opacity: 0; }
718
  .hero-badge { opacity: 0; }
719
- .hero h1 { opacity: 0; }
 
720
  .hero p { opacity: 0; }
721
  .hero-cta { opacity: 0; }
722
  .features-grid { opacity: 1; }
@@ -812,7 +867,7 @@ function setupNavbar() {
812
  function initAnimations() {
813
  const prefersReduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
814
  if (prefersReduced) {
815
- document.querySelectorAll('.hero, .hero-badge, .hero h1, .hero p, .hero-cta, .features-grid, .feature-card, .chat-section, .footer').forEach(el => {
816
  el.style.opacity = '1';
817
  });
818
  return;
@@ -838,11 +893,21 @@ function initAnimations() {
838
  duration: 500
839
  })
840
  .add({
841
- targets: '.hero h1',
842
  opacity: [0, 1],
843
- translateY: [25, 0],
844
- duration: 700
 
845
  }, '-=300')
 
 
 
 
 
 
 
 
 
846
  .add({
847
  targets: '.hero p',
848
  opacity: [0, 1],
@@ -1060,7 +1125,12 @@ with gr.Blocks(
1060
  <span class="hero-badge-dot"></span>
1061
  Powered by Featherless AI
1062
  </div>
1063
- <h1>Yuuki-RxG</h1>
 
 
 
 
 
1064
  <p>Modelo de lenguaje de última generación servido vía featherless-ai. Inferencia rápida, segura y con autenticación Hugging Face.</p>
1065
  <div class="hero-cta">
1066
  <a href="#chat" class="btn btn-primary">
@@ -1071,6 +1141,10 @@ with gr.Blocks(
1071
  <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1-2.5-1.5-5.5-1.5-8 0-2-1-3-1-3-1-.28 1.15-.28 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4"/><path d="M9 18H6a2 2 0 0 1-2-2v-1a2 2 0 0 1 2-2h3"/></svg>
1072
  Ver modelo
1073
  </a>
 
 
 
 
1074
  </div>
1075
  </section>
1076
  """)
@@ -1114,6 +1188,7 @@ with gr.Blocks(
1114
 
1115
  gr.load(
1116
  "models/OpceanAI/Yuuki-RxG",
 
1117
  provider="featherless-ai",
1118
  )
1119
 
@@ -1122,9 +1197,21 @@ with gr.Blocks(
1122
  <footer class="footer">
1123
  <p>Construido con <a href="https://gradio.app" target="_blank">Gradio</a> ·
1124
  Servido vía <a href="https://featherless.ai" target="_blank">Featherless AI</a> ·
1125
- <a href="https://huggingface.co/OpceanAI/Yuuki-RxG" target="_blank">Hugging Face</a></p>
 
1126
  </footer>
1127
  """)
1128
 
1129
  if __name__ == "__main__":
1130
- demo.launch()
 
 
 
 
 
 
 
 
 
 
 
 
250
  .hero {
251
  padding: 120px 24px 60px;
252
  text-align: center;
253
+ max-width: 900px;
254
  margin: 0 auto;
255
  position: relative;
256
  }
257
 
258
+ .hero-title-container {
259
+ position: relative;
260
+ display: inline-block;
261
+ margin-bottom: 24px;
262
+ }
263
+
264
+ .hero-title {
265
+ font-size: clamp(3.5rem, 10vw, 7rem) !important;
266
+ font-weight: 900 !important;
267
+ letter-spacing: -0.02em !important;
268
+ line-height: 1 !important;
269
+ margin: 0 !important;
270
+ position: relative;
271
+ z-index: 2;
272
+ display: flex;
273
+ justify-content: center;
274
+ flex-wrap: wrap;
275
+ }
276
+
277
+ .hero-letter {
278
+ display: inline-block;
279
+ background: linear-gradient(135deg, #22c55e 0%, #a855f7 50%, #3b82f6 100%);
280
+ -webkit-background-clip: text;
281
+ -webkit-text-fill-color: transparent;
282
+ background-clip: text;
283
+ filter: drop-shadow(0 0 20px rgba(34, 197, 94, 0.3));
284
+ transition: filter 0.3s ease, transform 0.3s ease;
285
+ cursor: default;
286
+ }
287
+
288
+ .hero-letter:hover {
289
+ filter: drop-shadow(0 0 40px rgba(168, 85, 247, 0.6));
290
+ transform: translateY(-5px) scale(1.1);
291
+ }
292
+
293
+ .hero-space {
294
+ display: inline-block;
295
+ width: 0.3em;
296
+ }
297
+
298
+ .hero-glow-bg {
299
+ position: absolute;
300
+ top: 50%;
301
+ left: 50%;
302
+ transform: translate(-50%, -50%);
303
+ width: 120%;
304
+ height: 120%;
305
+ background: radial-gradient(ellipse at center, rgba(34, 197, 94, 0.15) 0%, rgba(168, 85, 247, 0.08) 40%, transparent 70%);
306
+ z-index: 1;
307
+ pointer-events: none;
308
+ opacity: 0;
309
+ filter: blur(40px);
310
+ }
311
+
312
  .hero-badge {
313
  display: inline-flex;
314
  align-items: center;
 
770
  /* ─── Animations (anime.js handles all) ────────────────────────────────────── */
771
  .hero { opacity: 0; }
772
  .hero-badge { opacity: 0; }
773
+ .hero-glow-bg { opacity: 0; }
774
+ .hero-letter { opacity: 0; }
775
  .hero p { opacity: 0; }
776
  .hero-cta { opacity: 0; }
777
  .features-grid { opacity: 1; }
 
867
  function initAnimations() {
868
  const prefersReduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
869
  if (prefersReduced) {
870
+ document.querySelectorAll('.hero, .hero-badge, .hero-letter, .hero-glow-bg, .hero p, .hero-cta, .features-grid, .feature-card, .chat-section, .footer').forEach(el => {
871
  el.style.opacity = '1';
872
  });
873
  return;
 
893
  duration: 500
894
  })
895
  .add({
896
+ targets: '.hero-glow-bg',
897
  opacity: [0, 1],
898
+ scale: [0.8, 1],
899
+ duration: 800,
900
+ easing: 'easeOutQuad'
901
  }, '-=300')
902
+ .add({
903
+ targets: '.hero-letter',
904
+ opacity: [0, 1],
905
+ translateY: [40, 0],
906
+ scale: [0.8, 1],
907
+ delay: anime.stagger(80, { start: 100 }),
908
+ duration: 800,
909
+ easing: 'easeOutElastic(1, .6)'
910
+ }, '-=600')
911
  .add({
912
  targets: '.hero p',
913
  opacity: [0, 1],
 
1125
  <span class="hero-badge-dot"></span>
1126
  Powered by Featherless AI
1127
  </div>
1128
+ <div class="hero-title-container">
1129
+ <h1 class="hero-title" id="hero-title">
1130
+ <span class="hero-letter">Y</span><span class="hero-letter">u</span><span class="hero-letter">u</span><span class="hero-letter">k</span><span class="hero-letter">i</span><span class="hero-space"> </span><span class="hero-letter">R</span><span class="hero-letter">x</span><span class="hero-letter">G</span>
1131
+ </h1>
1132
+ <div class="hero-glow-bg"></div>
1133
+ </div>
1134
  <p>Modelo de lenguaje de última generación servido vía featherless-ai. Inferencia rápida, segura y con autenticación Hugging Face.</p>
1135
  <div class="hero-cta">
1136
  <a href="#chat" class="btn btn-primary">
 
1141
  <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1-2.5-1.5-5.5-1.5-8 0-2-1-3-1-3-1-.28 1.15-.28 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4"/><path d="M9 18H6a2 2 0 0 1-2-2v-1a2 2 0 0 1 2-2h3"/></svg>
1142
  Ver modelo
1143
  </a>
1144
+ <a href="https://github.com/OpceanAI" target="_blank" class="btn btn-secondary">
1145
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1-2.5-1.5-5.5-1.5-8 0-2-1-3-1-3-1-.28 1.15-.28 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4"/><path d="M9 18H6a2 2 0 0 1-2-2v-1a2 2 0 0 1 2-2h3"/></svg>
1146
+ GitHub
1147
+ </a>
1148
  </div>
1149
  </section>
1150
  """)
 
1188
 
1189
  gr.load(
1190
  "models/OpceanAI/Yuuki-RxG",
1191
+ accept_token=login_btn,
1192
  provider="featherless-ai",
1193
  )
1194
 
 
1197
  <footer class="footer">
1198
  <p>Construido con <a href="https://gradio.app" target="_blank">Gradio</a> ·
1199
  Servido vía <a href="https://featherless.ai" target="_blank">Featherless AI</a> ·
1200
+ <a href="https://huggingface.co/OpceanAI/Yuuki-RxG" target="_blank">Hugging Face</a> ·
1201
+ <a href="https://github.com/OpceanAI" target="_blank">GitHub</a></p>
1202
  </footer>
1203
  """)
1204
 
1205
  if __name__ == "__main__":
1206
+ try:
1207
+ demo.launch()
1208
+ finally:
1209
+ import asyncio
1210
+ try:
1211
+ loop = asyncio.get_event_loop()
1212
+ if loop.is_running():
1213
+ loop.stop()
1214
+ if not loop.is_closed():
1215
+ loop.close()
1216
+ except Exception:
1217
+ pass