zenityx commited on
Commit
6cd1434
·
verified ·
1 Parent(s): 7ca1605

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -15
app.py CHANGED
@@ -426,12 +426,11 @@ T = \left(\frac{(1 - A) \times L}{16 \pi \sigma \, d^2}\right)^{\frac{1}{4}} - 2
426
  css_code = """
427
  body {
428
  /* ลบการกำหนดสีพื้นหลัง */
429
- /* background-color: #F9FBFF; */
 
430
  font-family: "Kanit", sans-serif;
431
- /* ใช้ตัวแปรสีสำหรับพื้นหลัง */
432
- background-color: var(--background-color);
433
- color: var(--text-color);
434
  }
 
435
  #title {
436
  color: #4A90E2;
437
  text-align: center;
@@ -440,40 +439,44 @@ body {
440
  margin-bottom: 10px;
441
  font-weight: bold;
442
  }
 
443
  .game-desc {
444
  margin: 0 auto;
445
  width: 90%;
446
  /* ลบการกำหนดสีพื้นหลัง */
447
- /* background-color: #ECF6FF; */
448
  border: 2px dashed #B3DAFF;
449
  border-radius: 10px;
450
  padding: 15px;
451
  /* เปลี่ยนสีข้อความให้เข้ากับธีม */
452
- color: var(--text-color, #333);
453
  margin-bottom: 20px;
454
  }
 
455
  .btn-main {
456
- background-color: #FFE066;
457
- border: 2px solid #FFCA28;
458
  font-weight: bold;
459
  font-size: 1.1rem;
460
  padding: 10px 30px;
461
  border-radius: 10px;
462
  margin-right: 10px;
463
  }
 
464
  #child-summary, #detail-th, #prompt1-en, #prompt2-en, #prompt3-en, #formula-box {
465
  /* ลบการกำหนดสีพื้นหลัง */
466
- /* background-color: #FFFDF5; */
467
- border: 2px solid #FFE082;
468
  border-radius: 10px;
469
  padding: 10px;
470
  margin-bottom: 20px;
471
  /* เปลี่ยนสีข้อความให้เข้ากับธีม */
472
- color: var(--text-color, #333);
473
  }
 
474
  .copy-btn {
475
- background-color: #F06292;
476
- border: 2px solid #E91E63;
477
  font-weight: bold;
478
  font-size: 0.8rem;
479
  padding: 5px 10px;
@@ -483,14 +486,19 @@ body {
483
 
484
  /* ตัวแปรสีสำหรับธีม */
485
  :root {
486
- --background-color: #FFFFFF;
487
  --text-color: #333333;
488
  }
489
 
490
  [data-theme="dark"] {
491
- --background-color: #121212;
492
  --text-color: #FFFFFF;
493
  }
 
 
 
 
 
494
  """
495
 
496
  def show_formula(state):
 
426
  css_code = """
427
  body {
428
  /* ลบการกำหนดสีพื้นหลัง */
429
+ background-color: transparent !important;
430
+ color: var(--text-color) !important;
431
  font-family: "Kanit", sans-serif;
 
 
 
432
  }
433
+
434
  #title {
435
  color: #4A90E2;
436
  text-align: center;
 
439
  margin-bottom: 10px;
440
  font-weight: bold;
441
  }
442
+
443
  .game-desc {
444
  margin: 0 auto;
445
  width: 90%;
446
  /* ลบการกำหนดสีพื้นหลัง */
447
+ background-color: transparent !important;
448
  border: 2px dashed #B3DAFF;
449
  border-radius: 10px;
450
  padding: 15px;
451
  /* เปลี่ยนสีข้อความให้เข้ากับธีม */
452
+ color: var(--text-color, #333) !important;
453
  margin-bottom: 20px;
454
  }
455
+
456
  .btn-main {
457
+ background-color: #FFE066 !important;
458
+ border: 2px solid #FFCA28 !important;
459
  font-weight: bold;
460
  font-size: 1.1rem;
461
  padding: 10px 30px;
462
  border-radius: 10px;
463
  margin-right: 10px;
464
  }
465
+
466
  #child-summary, #detail-th, #prompt1-en, #prompt2-en, #prompt3-en, #formula-box {
467
  /* ลบการกำหนดสีพื้นหลัง */
468
+ background-color: transparent !important;
469
+ border: 2px solid #FFE082 !important;
470
  border-radius: 10px;
471
  padding: 10px;
472
  margin-bottom: 20px;
473
  /* เปลี่ยนสีข้อความให้เข้ากับธีม */
474
+ color: var(--text-color, #333) !important;
475
  }
476
+
477
  .copy-btn {
478
+ background-color: #F06292 !important;
479
+ border: 2px solid #E91E63 !important;
480
  font-weight: bold;
481
  font-size: 0.8rem;
482
  padding: 5px 10px;
 
486
 
487
  /* ตัวแปรสีสำหรับธีม */
488
  :root {
489
+ --background-color: transparent;
490
  --text-color: #333333;
491
  }
492
 
493
  [data-theme="dark"] {
494
+ --background-color: transparent;
495
  --text-color: #FFFFFF;
496
  }
497
+
498
+ /* เพิ่มการลบสีพื้นหลังจาก Gradio containers */
499
+ .gradio-container, .gradio-blocks, .gradio-row, .gradio-column, .gradio-component {
500
+ background-color: transparent !important;
501
+ }
502
  """
503
 
504
  def show_formula(state):