Spaces:
Sleeping
Sleeping
Youngsun Lim
commited on
Commit
·
dd92c42
1
Parent(s):
d4350e9
1014
Browse files
app.py
CHANGED
|
@@ -117,9 +117,73 @@ for cls, files in EXAMPLES.items():
|
|
| 117 |
except Exception as e:
|
| 118 |
print(f"[WARN] example missing: {cls} {kind} -> {fname}: {e}")
|
| 119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 120 |
|
| 121 |
# -------------------- UI --------------------
|
| 122 |
-
with gr.Blocks(fill_height=True) as demo:
|
| 123 |
# ------------------ PAGE 1: Intro + Examples ------------------
|
| 124 |
page_intro = gr.Group(visible=True)
|
| 125 |
with page_intro:
|
|
|
|
| 117 |
except Exception as e:
|
| 118 |
print(f"[WARN] example missing: {cls} {kind} -> {fname}: {e}")
|
| 119 |
|
| 120 |
+
GLOBAL_CSS = """
|
| 121 |
+
/* ===== 공통 변수 투명화 (v3/v4 둘다) ===== */
|
| 122 |
+
:root, .gradio-container {
|
| 123 |
+
--body-background-fill: transparent !important;
|
| 124 |
+
--background-fill-primary: transparent !important;
|
| 125 |
+
--background-fill-secondary: transparent !important;
|
| 126 |
+
--block-background-fill: transparent !important;
|
| 127 |
+
--block-border-color: transparent !important;
|
| 128 |
+
--panel-background-fill: transparent !important;
|
| 129 |
+
--panel-border-color: transparent !important;
|
| 130 |
+
--section-header-background-fill: transparent !important;
|
| 131 |
+
--shadow-drop: 0 0 0 rgba(0,0,0,0) !important;
|
| 132 |
+
--shadow-spread: 0 0 0 rgba(0,0,0,0) !important;
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
/* ===== v4(Tailwind 기반)에서 자주 쓰이는 배경/테두리/그림자 제거 ===== */
|
| 136 |
+
.gradio-container .bg-white,
|
| 137 |
+
.gradio-container .bg-gray-50,
|
| 138 |
+
.gradio-container .bg-gray-100,
|
| 139 |
+
.gradio-container .bg-slate-50,
|
| 140 |
+
.gradio-container .bg-neutral-50,
|
| 141 |
+
.gradio-container .bg-secondary,
|
| 142 |
+
.gradio-container .border,
|
| 143 |
+
.gradio-container .shadow,
|
| 144 |
+
.gradio-container .shadow-sm,
|
| 145 |
+
.gradio-container .shadow-md,
|
| 146 |
+
.gradio-container .ring-1,
|
| 147 |
+
.gradio-container .ring,
|
| 148 |
+
.gradio-container .gr-card,
|
| 149 |
+
.gradio-container .prose > *:where(hr) {
|
| 150 |
+
background: transparent !important;
|
| 151 |
+
box-shadow: none !important;
|
| 152 |
+
border-color: transparent !important;
|
| 153 |
+
}
|
| 154 |
+
|
| 155 |
+
/* ===== v3 컴포넌트 계열 ===== */
|
| 156 |
+
.gradio-container .gr-panel,
|
| 157 |
+
.gradio-container .gr-group,
|
| 158 |
+
.gradio-container .gr-box,
|
| 159 |
+
.gradio-container .gr-row,
|
| 160 |
+
.gradio-container .gr-column,
|
| 161 |
+
.gradio-container .gr-accordion,
|
| 162 |
+
.gradio-container .gr-block,
|
| 163 |
+
.gradio-container .gr-form,
|
| 164 |
+
.gradio-container .gr-tabs,
|
| 165 |
+
.gradio-container .gr-tabitem,
|
| 166 |
+
.gradio-container .gr-section-header {
|
| 167 |
+
background: transparent !important;
|
| 168 |
+
box-shadow: none !important;
|
| 169 |
+
border: none !important;
|
| 170 |
+
}
|
| 171 |
+
|
| 172 |
+
/* 구분선/헤더 바 제거 */
|
| 173 |
+
.gradio-container hr,
|
| 174 |
+
.gradio-container .gr-divider,
|
| 175 |
+
.gradio-container .gr-accordion .label {
|
| 176 |
+
background: transparent !important;
|
| 177 |
+
border: none !important;
|
| 178 |
+
box-shadow: none !important;
|
| 179 |
+
}
|
| 180 |
+
|
| 181 |
+
/* 바깥쪽 페이지 배경도 강제로 투명/흰색으로 */
|
| 182 |
+
html, body, .gradio-container { background: transparent !important; }
|
| 183 |
+
"""
|
| 184 |
|
| 185 |
# -------------------- UI --------------------
|
| 186 |
+
with gr.Blocks(fill_height=True, css=GLOBAL_CSS) as demo:
|
| 187 |
# ------------------ PAGE 1: Intro + Examples ------------------
|
| 188 |
page_intro = gr.Group(visible=True)
|
| 189 |
with page_intro:
|