Spaces:
Sleeping
Sleeping
Youngsun Lim
commited on
Commit
ยท
d3f8d67
1
Parent(s):
ef92f95
add random code
Browse files
app.py
CHANGED
|
@@ -353,117 +353,85 @@ for cls in EX_CACHE:
|
|
| 353 |
if EX_CACHE[cls][kind]:
|
| 354 |
EX_CACHE[cls][kind] = ensure_muted_copy(EX_CACHE[cls][kind])
|
| 355 |
|
| 356 |
-
# GLOBAL_CSS = """
|
| 357 |
-
# /* ===== ๊ณตํต ๋ณ์ ํฌ๋ช
ํ (v3/v4 ๋๋ค) ===== */
|
| 358 |
-
# :root, .gradio-container {
|
| 359 |
-
# --body-background-fill: transparent !important;
|
| 360 |
-
# --background-fill-primary: transparent !important;
|
| 361 |
-
# --background-fill-secondary: transparent !important;
|
| 362 |
-
# --block-background-fill: transparent !important;
|
| 363 |
-
# --block-border-color: transparent !important;
|
| 364 |
-
# --panel-background-fill: transparent !important;
|
| 365 |
-
# --panel-border-color: transparent !important;
|
| 366 |
-
# --section-header-background-fill: transparent !important;
|
| 367 |
-
# --shadow-drop: 0 0 0 rgba(0,0,0,0) !important;
|
| 368 |
-
# --shadow-spread: 0 0 0 rgba(0,0,0,0) !important;
|
| 369 |
-
# }
|
| 370 |
-
|
| 371 |
-
# /* ===== v4(Tailwind ๊ธฐ๋ฐ)์์ ์์ฃผ ์ฐ์ด๋ ๋ฐฐ๊ฒฝ/ํ
๋๋ฆฌ/๊ทธ๋ฆผ์ ์ ๊ฑฐ ===== */
|
| 372 |
-
# .gradio-container .bg-white,
|
| 373 |
-
# .gradio-container .bg-gray-50,
|
| 374 |
-
# .gradio-container .bg-gray-100,
|
| 375 |
-
# .gradio-container .bg-slate-50,
|
| 376 |
-
# .gradio-container .bg-neutral-50,
|
| 377 |
-
# .gradio-container .bg-secondary,
|
| 378 |
-
# .gradio-container .border,
|
| 379 |
-
# .gradio-container .shadow,
|
| 380 |
-
# .gradio-container .shadow-sm,
|
| 381 |
-
# .gradio-container .shadow-md,
|
| 382 |
-
# .gradio-container .ring-1,
|
| 383 |
-
# .gradio-container .ring,
|
| 384 |
-
# .gradio-container .gr-card,
|
| 385 |
-
# .gradio-container .prose > *:where(hr) {
|
| 386 |
-
# background: transparent !important;
|
| 387 |
-
# box-shadow: none !important;
|
| 388 |
-
# border-color: transparent !important;
|
| 389 |
-
# }
|
| 390 |
-
|
| 391 |
-
# /* ===== v3 ์ปดํฌ๋ํธ ๊ณ์ด ===== */
|
| 392 |
-
# .gradio-container .gr-panel,
|
| 393 |
-
# .gradio-container .gr-group,
|
| 394 |
-
# .gradio-container .gr-box,
|
| 395 |
-
# .gradio-container .gr-row,
|
| 396 |
-
# .gradio-container .gr-column,
|
| 397 |
-
# .gradio-container .gr-accordion,
|
| 398 |
-
# .gradio-container .gr-block,
|
| 399 |
-
# .gradio-container .gr-form,
|
| 400 |
-
# .gradio-container .gr-tabs,
|
| 401 |
-
# .gradio-container .gr-tabitem,
|
| 402 |
-
# .gradio-container .gr-section-header {
|
| 403 |
-
# background: transparent !important;
|
| 404 |
-
# box-shadow: none !important;
|
| 405 |
-
# border: none !important;
|
| 406 |
-
# }
|
| 407 |
-
|
| 408 |
-
# /* ๊ตฌ๋ถ์ /ํค๋ ๋ฐ ์ ๊ฑฐ */
|
| 409 |
-
# .gradio-container hr,
|
| 410 |
-
# .gradio-container .gr-divider,
|
| 411 |
-
# .gradio-container .gr-accordion .label {
|
| 412 |
-
# background: transparent !important;
|
| 413 |
-
# border: none !important;
|
| 414 |
-
# box-shadow: none !important;
|
| 415 |
-
# }
|
| 416 |
-
|
| 417 |
-
# /* ๋ฐ๊นฅ์ชฝ ํ์ด์ง ๋ฐฐ๊ฒฝ๋ ๊ฐ์ ๋ก ํฌ๋ช
/ํฐ์์ผ๋ก */
|
| 418 |
-
# html, body, .gradio-container { background: transparent !important; }
|
| 419 |
-
|
| 420 |
-
# /* ๊ธฐ์กด CSS ์๋์ ์ถ๊ฐ */
|
| 421 |
-
# #eval [class*="bg-"],
|
| 422 |
-
# #eval [class*="border"],
|
| 423 |
-
# #eval [class*="shadow"],
|
| 424 |
-
# #eval .gr-panel, #eval .gr-group, #eval .gr-box, #eval .gr-row, #eval .gr-column,
|
| 425 |
-
# #eval .gr-block, #eval .gr-form, #eval .gr-section-header, #eval .gr-accordion {
|
| 426 |
-
# background: transparent !important;
|
| 427 |
-
# border-color: transparent !important;
|
| 428 |
-
# box-shadow: none !important;
|
| 429 |
-
# }
|
| 430 |
-
# #eval .gr-form, #eval .gr-panel { background: transparent !important; box-shadow:none !important; border:none !important; }
|
| 431 |
-
# html, body, .gradio-container {
|
| 432 |
-
# overflow-y: auto !important;
|
| 433 |
-
# height: auto !important;
|
| 434 |
-
# }
|
| 435 |
-
# """
|
| 436 |
GLOBAL_CSS = """
|
| 437 |
-
/*
|
| 438 |
-
|
| 439 |
-
|
| 440 |
-
|
| 441 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 442 |
}
|
| 443 |
|
| 444 |
-
/*
|
| 445 |
-
.gradio-container .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 446 |
.gradio-container .gr-row,
|
| 447 |
.gradio-container .gr-column,
|
| 448 |
.gradio-container .gr-accordion,
|
| 449 |
-
.gradio-container .gr-
|
| 450 |
-
.gradio-container .gr-
|
| 451 |
-
.gradio-container .gr-
|
| 452 |
-
|
| 453 |
-
|
| 454 |
-
|
|
|
|
|
|
|
| 455 |
}
|
| 456 |
|
| 457 |
-
/*
|
| 458 |
-
|
| 459 |
-
|
| 460 |
-
|
| 461 |
-
|
|
|
|
|
|
|
| 462 |
}
|
|
|
|
|
|
|
| 463 |
html, body, .gradio-container { background: transparent !important; }
|
| 464 |
|
| 465 |
-
/*
|
| 466 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 467 |
"""
|
| 468 |
|
| 469 |
# -------------------- UI --------------------
|
|
|
|
| 353 |
if EX_CACHE[cls][kind]:
|
| 354 |
EX_CACHE[cls][kind] = ensure_muted_copy(EX_CACHE[cls][kind])
|
| 355 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 356 |
GLOBAL_CSS = """
|
| 357 |
+
/* ===== ๊ณตํต ๋ณ์ ํฌ๋ช
ํ (v3/v4 ๋๋ค) ===== */
|
| 358 |
+
:root, .gradio-container {
|
| 359 |
+
--body-background-fill: transparent !important;
|
| 360 |
+
--background-fill-primary: transparent !important;
|
| 361 |
+
--background-fill-secondary: transparent !important;
|
| 362 |
+
--block-background-fill: transparent !important;
|
| 363 |
+
--block-border-color: transparent !important;
|
| 364 |
+
--panel-background-fill: transparent !important;
|
| 365 |
+
--panel-border-color: transparent !important;
|
| 366 |
+
--section-header-background-fill: transparent !important;
|
| 367 |
+
--shadow-drop: 0 0 0 rgba(0,0,0,0) !important;
|
| 368 |
+
--shadow-spread: 0 0 0 rgba(0,0,0,0) !important;
|
| 369 |
}
|
| 370 |
|
| 371 |
+
/* ===== v4(Tailwind ๊ธฐ๋ฐ)์์ ์์ฃผ ์ฐ์ด๋ ๋ฐฐ๊ฒฝ/ํ
๋๋ฆฌ/๊ทธ๋ฆผ์ ์ ๊ฑฐ ===== */
|
| 372 |
+
.gradio-container .bg-white,
|
| 373 |
+
.gradio-container .bg-gray-50,
|
| 374 |
+
.gradio-container .bg-gray-100,
|
| 375 |
+
.gradio-container .bg-slate-50,
|
| 376 |
+
.gradio-container .bg-neutral-50,
|
| 377 |
+
.gradio-container .bg-secondary,
|
| 378 |
+
.gradio-container .border,
|
| 379 |
+
.gradio-container .shadow,
|
| 380 |
+
.gradio-container .shadow-sm,
|
| 381 |
+
.gradio-container .shadow-md,
|
| 382 |
+
.gradio-container .ring-1,
|
| 383 |
+
.gradio-container .ring,
|
| 384 |
+
.gradio-container .gr-card,
|
| 385 |
+
.gradio-container .prose > *:where(hr) {
|
| 386 |
+
background: transparent !important;
|
| 387 |
+
box-shadow: none !important;
|
| 388 |
+
border-color: transparent !important;
|
| 389 |
+
}
|
| 390 |
+
|
| 391 |
+
/* ===== v3 ์ปดํฌ๋ํธ ๊ณ์ด ===== */
|
| 392 |
+
.gradio-container .gr-panel,
|
| 393 |
+
.gradio-container .gr-group,
|
| 394 |
+
.gradio-container .gr-box,
|
| 395 |
.gradio-container .gr-row,
|
| 396 |
.gradio-container .gr-column,
|
| 397 |
.gradio-container .gr-accordion,
|
| 398 |
+
.gradio-container .gr-block,
|
| 399 |
+
.gradio-container .gr-form,
|
| 400 |
+
.gradio-container .gr-tabs,
|
| 401 |
+
.gradio-container .gr-tabitem,
|
| 402 |
+
.gradio-container .gr-section-header {
|
| 403 |
+
background: transparent !important;
|
| 404 |
+
box-shadow: none !important;
|
| 405 |
+
border: none !important;
|
| 406 |
}
|
| 407 |
|
| 408 |
+
/* ๊ตฌ๋ถ์ /ํค๋ ๋ฐ ์ ๊ฑฐ */
|
| 409 |
+
.gradio-container hr,
|
| 410 |
+
.gradio-container .gr-divider,
|
| 411 |
+
.gradio-container .gr-accordion .label {
|
| 412 |
+
background: transparent !important;
|
| 413 |
+
border: none !important;
|
| 414 |
+
box-shadow: none !important;
|
| 415 |
}
|
| 416 |
+
|
| 417 |
+
/* ๋ฐ๊นฅ์ชฝ ํ์ด์ง ๋ฐฐ๊ฒฝ๋ ๊ฐ์ ๋ก ํฌ๋ช
/ํฐ์์ผ๋ก */
|
| 418 |
html, body, .gradio-container { background: transparent !important; }
|
| 419 |
|
| 420 |
+
/* ๊ธฐ์กด CSS ์๋์ ์ถ๊ฐ */
|
| 421 |
+
#eval [class*="bg-"],
|
| 422 |
+
#eval [class*="border"],
|
| 423 |
+
#eval [class*="shadow"],
|
| 424 |
+
#eval .gr-panel, #eval .gr-group, #eval .gr-box, #eval .gr-row, #eval .gr-column,
|
| 425 |
+
#eval .gr-block, #eval .gr-form, #eval .gr-section-header, #eval .gr-accordion {
|
| 426 |
+
background: transparent !important;
|
| 427 |
+
border-color: transparent !important;
|
| 428 |
+
box-shadow: none !important;
|
| 429 |
+
}
|
| 430 |
+
#eval .gr-form, #eval .gr-panel { background: transparent !important; box-shadow:none !important; border:none !important; }
|
| 431 |
+
html, body, .gradio-container {
|
| 432 |
+
overflow-y: auto !important;
|
| 433 |
+
height: auto !important;
|
| 434 |
+
}
|
| 435 |
"""
|
| 436 |
|
| 437 |
# -------------------- UI --------------------
|