Update app.py
Browse files
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 |
-
#
|
457 |
custom_css = """
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
|
|
463 |
}
|
|
|
|
|
464 |
.message-textbox textarea {
|
465 |
-
font-size: 0.8rem !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
466 |
}
|
467 |
"""
|
468 |
|
469 |
-
#
|
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
|
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__":
|