Youngsun Lim commited on
Commit
ef92f95
ยท
1 Parent(s): 2e7b989

add random code

Browse files
Files changed (1) hide show
  1. app.py +100 -68
app.py CHANGED
@@ -353,85 +353,117 @@ 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
 
437
  # -------------------- 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
  GLOBAL_CSS = """
437
+ /* === ์ƒ์œ„ ๋ž˜ํผ๊ฐ€ overflow๋ฅผ ์ž ๊ฐ€๋„ ์Šคํฌ๋กค ๊ฐ€๋Šฅํ•˜๊ฒŒ === */
438
+ html, body, #root, #root > div, .gradio-container {
439
+ height: auto !important;
440
+ min-height: 100% !important;
441
+ overflow-y: auto !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
442
  }
443
 
444
+ /* Gradio v4 ๋‚ด๋ถ€ ์ปจํ…Œ์ด๋„ˆ๋“ค์ด ๋†’์ด๋ฅผ ๊ณ ์ •/ํด๋ฆฝํ•˜์ง€ ์•Š๋„๋ก */
445
+ .gradio-container .prose,
 
 
446
  .gradio-container .gr-row,
447
  .gradio-container .gr-column,
448
  .gradio-container .gr-accordion,
449
+ .gradio-container .gr-group,
450
+ .gradio-container .gr-panel,
451
+ .gradio-container .gr-box {
452
+ max-height: none !important;
453
+ height: auto !important;
454
+ overflow: visible !important;
 
 
455
  }
456
 
457
+ /* ๋ฐฐ๊ฒฝ๋งŒ ํˆฌ๋ช… ์ฒ˜๋ฆฌ(์‹œ๊ฐ ์Šคํƒ€์ผ๋งŒ, ๋ ˆ์ด์•„์›ƒ ์†์„ฑ์€ ๊ฑด๋“œ๋ฆฌ์ง€ ์•Š์Œ) */
458
+ :root, .gradio-container {
459
+ --body-background-fill: transparent !important;
460
+ --background-fill-primary: transparent !important;
461
+ --background-fill-secondary: transparent !important;
 
 
462
  }
 
 
463
  html, body, .gradio-container { background: transparent !important; }
464
 
465
+ /* (์„ ํƒ) ์‹œ์ž‘ ๋ฒ„ํŠผ ํ•ญ์ƒ ๋ณด์ด๊ฒŒ */
466
+ #start_btn { position: sticky; top: 8px; z-index: 100; }
 
 
 
 
 
 
 
 
 
 
 
 
 
467
  """
468
 
469
  # -------------------- UI --------------------