Update app.py
Browse files
app.py
CHANGED
|
@@ -501,17 +501,32 @@ with gr.Blocks() as demo:
|
|
| 501 |
# 5. Application Styling (CSS)
|
| 502 |
# ==========================================
|
| 503 |
css = """
|
|
|
|
|
|
|
|
|
|
|
|
|
| 504 |
table {
|
| 505 |
-
table-layout:
|
| 506 |
-
width:
|
|
|
|
| 507 |
}
|
| 508 |
|
| 509 |
-
/* 7์ด ์ด์์ ๋ค์ค ์ด์ ๋ํ ๊ธฐ๋ณธ Fallback (๊ฐ๋ก ์คํฌ๋กค ํ์ฉ) */
|
| 510 |
th, td {
|
| 511 |
-
min-width: 150px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 512 |
}
|
| 513 |
|
| 514 |
-
/* [ํด๊ฒฐ 2] ์์ฑํ์
จ๋ ๊ธฐ์กด 2~6 ์ปฌ๋ผ ๋น์จ ์์ ๋ณต๊ตฌ (min-width ๋ฌด์ ์ค์ ์ถ๊ฐ) */
|
| 515 |
/* 2์ปฌ๋ผ */
|
| 516 |
table th:nth-last-child(2):first-child, table td:nth-last-child(2):first-child { width: 15% !important; min-width: 0 !important; }
|
| 517 |
table th:nth-last-child(1), table td:nth-last-child(1) { width: 85% !important; min-width: 0 !important; }
|
|
@@ -537,7 +552,9 @@ table th:nth-child(4):nth-last-child(3), table td:nth-child(4):nth-last-child(3)
|
|
| 537 |
table th:nth-child(5):nth-last-child(2), table td:nth-child(5):nth-last-child(2) { width: 8% !important; min-width: 0 !important; }
|
| 538 |
table th:nth-child(6):nth-last-child(1), table td:nth-child(6):nth-last-child(1) { width: 26% !important; min-width: 0 !important; }
|
| 539 |
|
| 540 |
-
/*
|
|
|
|
|
|
|
| 541 |
thead th {
|
| 542 |
font-size: 18px !important;
|
| 543 |
position: sticky;
|
|
@@ -548,7 +565,7 @@ thead th {
|
|
| 548 |
.dataframe {
|
| 549 |
max-height: none !important;
|
| 550 |
overflow-y: visible !important;
|
| 551 |
-
overflow-x: auto !important;
|
| 552 |
display: block;
|
| 553 |
}
|
| 554 |
.dataframe > div {
|
|
@@ -558,7 +575,7 @@ thead th {
|
|
| 558 |
td {
|
| 559 |
font-size: 18px !important;
|
| 560 |
white-space: pre-wrap !important;
|
| 561 |
-
word-break:
|
| 562 |
line-height: 1.6;
|
| 563 |
padding: 10px;
|
| 564 |
vertical-align: top !important;
|
|
|
|
| 501 |
# 5. Application Styling (CSS)
|
| 502 |
# ==========================================
|
| 503 |
css = """
|
| 504 |
+
/* ----------------------------------------------------
|
| 505 |
+
[1] ๊ธฐ๋ณธ ์ค์ (7์ด ์ด์ ๋ค์ค ์ด ๊ธฐ์ค)
|
| 506 |
+
- ์ด์ด ๋ง์ ๊ฒฝ์ฐ 100%๋ฅผ ๋์ด์ ์์ฐ์ค๋ฝ๊ฒ ์คํฌ๋กค๋๋๋ก ์ค์
|
| 507 |
+
---------------------------------------------------- */
|
| 508 |
table {
|
| 509 |
+
table-layout: auto !important;
|
| 510 |
+
width: max-content !important;
|
| 511 |
+
min-width: 100% !important;
|
| 512 |
}
|
| 513 |
|
|
|
|
| 514 |
th, td {
|
| 515 |
+
min-width: 150px; /* ์ด์ด ๋ง์๋ ๊ธ์๊ฐ ๊นจ์ง์ง ์๊ฒ ์ต์ ๋๋น ๋ฐฉ์ด */
|
| 516 |
+
}
|
| 517 |
+
|
| 518 |
+
/* ----------------------------------------------------
|
| 519 |
+
[2] 2, 4, 5, 6์ด ์กฐ๊ฑด๋ถ ์ค์ (์ง์ ํ์ ๋น์จ ์๋ฒฝ ๋ณต๊ตฌ)
|
| 520 |
+
- ํด๋น ์ด ๊ฐ์์ผ ๋๋ง ๊ณ ์ ๋ ์ด์์(fixed) ์ ์ฉ
|
| 521 |
+
---------------------------------------------------- */
|
| 522 |
+
table:has(th:nth-last-child(2):first-child),
|
| 523 |
+
table:has(th:nth-last-child(4):first-child),
|
| 524 |
+
table:has(th:nth-last-child(5):first-child),
|
| 525 |
+
table:has(th:nth-last-child(6):first-child) {
|
| 526 |
+
table-layout: fixed !important;
|
| 527 |
+
width: 100% !important;
|
| 528 |
}
|
| 529 |
|
|
|
|
| 530 |
/* 2์ปฌ๋ผ */
|
| 531 |
table th:nth-last-child(2):first-child, table td:nth-last-child(2):first-child { width: 15% !important; min-width: 0 !important; }
|
| 532 |
table th:nth-last-child(1), table td:nth-last-child(1) { width: 85% !important; min-width: 0 !important; }
|
|
|
|
| 552 |
table th:nth-child(5):nth-last-child(2), table td:nth-child(5):nth-last-child(2) { width: 8% !important; min-width: 0 !important; }
|
| 553 |
table th:nth-child(6):nth-last-child(1), table td:nth-child(6):nth-last-child(1) { width: 26% !important; min-width: 0 !important; }
|
| 554 |
|
| 555 |
+
/* ----------------------------------------------------
|
| 556 |
+
[3] ๋ฐ์ดํฐํ๋ ์ ๋ฐ ํค๋ ๊ธฐ๋ณธ ์คํฌ๋กค/ํ
์คํธ ์ค์
|
| 557 |
+
---------------------------------------------------- */
|
| 558 |
thead th {
|
| 559 |
font-size: 18px !important;
|
| 560 |
position: sticky;
|
|
|
|
| 565 |
.dataframe {
|
| 566 |
max-height: none !important;
|
| 567 |
overflow-y: visible !important;
|
| 568 |
+
overflow-x: auto !important; /* ์ข์ฐ ์คํฌ๋กค๋ฐ ํ์ฉ */
|
| 569 |
display: block;
|
| 570 |
}
|
| 571 |
.dataframe > div {
|
|
|
|
| 575 |
td {
|
| 576 |
font-size: 18px !important;
|
| 577 |
white-space: pre-wrap !important;
|
| 578 |
+
word-break: keep-all !important; /* ์ํ๋ฒณ์ด ํ๋์ฉ ์ฐข์ด์ง๋ ํ์ ๋ฐฉ์ง */
|
| 579 |
line-height: 1.6;
|
| 580 |
padding: 10px;
|
| 581 |
vertical-align: top !important;
|