SamiKoen commited on
Commit
9bbad34
·
verified ·
1 Parent(s): 7c13249

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +35 -9
app.py CHANGED
@@ -453,20 +453,46 @@ if not USE_SLOW_ECHO:
453
  scheduler_thread = threading.Thread(target=run_scheduler, args=(global_chat_history,), daemon=True)
454
  scheduler_thread.start()
455
 
456
- # Gradio arayüzüne ufak bir CSS değişikliği ekleyin
457
  custom_css = """
458
- .gradio-container {
459
- font-size: 0.85rem !important; /* Genel yazı boyutunu %10 küçült */
460
- }
461
- .message-wrap p, .message-wrap div {
462
- font-size: 0.8rem !important; /* Mesaj içindeki yazıları daha küçük yap */
 
463
  }
 
 
464
  .message-textbox textarea {
465
- font-size: 0.8rem !important; /* Mesaj yazma alanındaki yazıları küçült */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
466
  }
467
  """
468
 
469
- # ChatInterface'i oluştururken CSS ekleyin
470
  demo = gr.ChatInterface(
471
  fn=chat_fn,
472
  title="Trek Asistanı",
@@ -476,7 +502,7 @@ demo = gr.ChatInterface(
476
  flagging_options=["Doğru", "Yanlış", "Emin değilim", "Diğer"],
477
  save_history=True,
478
  autoscroll=True,
479
- css=custom_css # CSS'i buraya ekleyin
480
  )
481
 
482
  if __name__ == "__main__":
 
453
  scheduler_thread = threading.Thread(target=run_scheduler, args=(global_chat_history,), daemon=True)
454
  scheduler_thread.start()
455
 
456
+ # Tüm yazı boyutlarını 0.8rem yapan CSS
457
  custom_css = """
458
+ /* Genel font ayarları */
459
+ .gradio-container, .gradio-container *, .message-wrap, .message-wrap p, .message-wrap div,
460
+ button, input, select, textarea {
461
+ font-family: 'Segoe UI', 'SF Pro Text', 'Roboto', -apple-system, BlinkMacSystemFont,
462
+ 'Helvetica Neue', Arial, sans-serif !important;
463
+ font-size: 0.8rem !important; /* Tüm yazı boyutlarını 0.8rem yap */
464
  }
465
+
466
+ /* Input alanı için de aynı boyut */
467
  .message-textbox textarea {
468
+ font-size: 0.8rem !important;
469
+ }
470
+
471
+ /* Başlıklar için özel boyutlar */
472
+ h1 {
473
+ font-size: 1.4rem !important; /* Başlıklar için biraz daha büyük */
474
+ font-weight: 600 !important;
475
+ }
476
+
477
+ h2 {
478
+ font-size: 1.2rem !important;
479
+ font-weight: 600 !important;
480
+ }
481
+
482
+ h3 {
483
+ font-size: 1rem !important;
484
+ font-weight: 600 !important;
485
+ }
486
+
487
+ /* Daha net yazılar için text rendering */
488
+ * {
489
+ -webkit-font-smoothing: antialiased;
490
+ -moz-osx-font-smoothing: grayscale;
491
+ text-rendering: optimizeLegibility;
492
  }
493
  """
494
 
495
+ # Demo arayüzüne CSS'i ekleyin
496
  demo = gr.ChatInterface(
497
  fn=chat_fn,
498
  title="Trek Asistanı",
 
502
  flagging_options=["Doğru", "Yanlış", "Emin değilim", "Diğer"],
503
  save_history=True,
504
  autoscroll=True,
505
+ css=custom_css
506
  )
507
 
508
  if __name__ == "__main__":