Widen layout, restore logo, flatten Settings via CSS vars, drop heading rules
Browse files
app.py
CHANGED
|
@@ -137,11 +137,12 @@ gradio-app, gradio-app > .gradio-container, gradio-app > div {
|
|
| 137 |
}
|
| 138 |
|
| 139 |
[class*="gradio-container"] {
|
| 140 |
-
max-width:
|
|
|
|
| 141 |
margin-left: auto !important;
|
| 142 |
margin-right: auto !important;
|
| 143 |
-
padding-left:
|
| 144 |
-
padding-right:
|
| 145 |
color: #0f2744;
|
| 146 |
}
|
| 147 |
|
|
@@ -180,14 +181,19 @@ gradio-app, gradio-app > .gradio-container, gradio-app > div {
|
|
| 180 |
border: none !important;
|
| 181 |
box-shadow: none !important;
|
| 182 |
}
|
| 183 |
-
/* Strip
|
| 184 |
-
|
|
|
|
| 185 |
.banner-logo-image .icon-button-wrapper,
|
| 186 |
.banner-logo-image .source-selection,
|
| 187 |
-
.banner-logo-image
|
|
|
|
| 188 |
.banner-logo-image [aria-label*="hare" i],
|
| 189 |
.banner-logo-image [aria-label*="ownload" i],
|
| 190 |
-
.banner-logo-image [aria-label*="ullscreen" i]
|
|
|
|
|
|
|
|
|
|
| 191 |
display: none !important;
|
| 192 |
}
|
| 193 |
|
|
@@ -214,9 +220,7 @@ gradio-app, gradio-app > .gradio-container, gradio-app > div {
|
|
| 214 |
letter-spacing: 0.1em;
|
| 215 |
text-transform: uppercase;
|
| 216 |
color: #2563eb;
|
| 217 |
-
margin: 0 0
|
| 218 |
-
padding-bottom: 10px;
|
| 219 |
-
border-bottom: 1px solid rgba(37,99,235,0.14);
|
| 220 |
}
|
| 221 |
|
| 222 |
/* --- ICON GRID (Paper / Code / Dataset / Model) --- */
|
|
@@ -291,23 +295,46 @@ gradio-app, gradio-app > .gradio-container, gradio-app > div {
|
|
| 291 |
background: transparent !important;
|
| 292 |
}
|
| 293 |
|
| 294 |
-
/* Inside our white section-cards,
|
| 295 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 296 |
.section-card .block,
|
| 297 |
.section-card .form,
|
| 298 |
.section-card .gr-form,
|
| 299 |
.section-card .gr-block,
|
| 300 |
.section-card .gr-panel,
|
|
|
|
| 301 |
.section-card .gradio-dropdown,
|
| 302 |
.section-card .gradio-slider,
|
| 303 |
.section-card .gradio-textbox,
|
| 304 |
.section-card .gradio-markdown,
|
| 305 |
-
.section-card .gradio-code
|
|
|
|
|
|
|
| 306 |
background: transparent !important;
|
| 307 |
border: none !important;
|
| 308 |
box-shadow: none !important;
|
| 309 |
padding: 0 !important;
|
| 310 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 311 |
|
| 312 |
/* Direct children of a card get vertical rhythm without extra chrome. */
|
| 313 |
.section-card > * + * { margin-top: 14px; }
|
|
@@ -451,11 +478,34 @@ gradio-app, gradio-app > .gradio-container, gradio-app > div {
|
|
| 451 |
color: #0f2744 !important;
|
| 452 |
border: none !important;
|
| 453 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 454 |
[class*="gradio-container"] .cm-gutters {
|
| 455 |
border-right: 1px solid #dbeafe !important;
|
| 456 |
color: #6b86a6 !important;
|
| 457 |
}
|
| 458 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 459 |
/* --- "Try Examples" preset buttons --- */
|
| 460 |
.inline-example-title {
|
| 461 |
font-size: 0.72rem;
|
|
@@ -807,14 +857,12 @@ with gr.Blocks(
|
|
| 807 |
|
| 808 |
with gr.Group(elem_classes="section-card"):
|
| 809 |
gr.HTML('<div class="section-heading">Try Examples</div>')
|
| 810 |
-
gr.HTML('<div class="example-note">Click to auto-fill the chat box</div>')
|
| 811 |
with gr.Column(elem_classes="example-buttons"):
|
| 812 |
ex1_btn = gr.Button("π Plan a 2-day Tokyo trip under $250 with trade-offs", variant="secondary")
|
| 813 |
ex2_btn = gr.Button("π€ Compare 3 open-source coding agents with pros/cons", variant="secondary")
|
| 814 |
ex3_btn = gr.Button("βοΈ RAG vs fine-tuning for legal QA: which and why?", variant="secondary")
|
| 815 |
|
| 816 |
with gr.Group(elem_classes="section-card"):
|
| 817 |
-
gr.HTML('<div class="section-heading">Output</div>')
|
| 818 |
with gr.Tabs():
|
| 819 |
with gr.TabItem("Result"):
|
| 820 |
answer = gr.Markdown(label="Final Answer")
|
|
|
|
| 137 |
}
|
| 138 |
|
| 139 |
[class*="gradio-container"] {
|
| 140 |
+
max-width: 1480px !important;
|
| 141 |
+
width: 92vw !important;
|
| 142 |
margin-left: auto !important;
|
| 143 |
margin-right: auto !important;
|
| 144 |
+
padding-left: 28px !important;
|
| 145 |
+
padding-right: 28px !important;
|
| 146 |
color: #0f2744;
|
| 147 |
}
|
| 148 |
|
|
|
|
| 181 |
border: none !important;
|
| 182 |
box-shadow: none !important;
|
| 183 |
}
|
| 184 |
+
/* Strip ONLY the overlay icon buttons (share / download / fullscreen). Do NOT touch
|
| 185 |
+
the wrapper <button> that Gradio uses to render the image itself, otherwise the
|
| 186 |
+
logo disappears. */
|
| 187 |
.banner-logo-image .icon-button-wrapper,
|
| 188 |
.banner-logo-image .source-selection,
|
| 189 |
+
.banner-logo-image .icon-buttons,
|
| 190 |
+
.banner-logo-image .icon-button,
|
| 191 |
.banner-logo-image [aria-label*="hare" i],
|
| 192 |
.banner-logo-image [aria-label*="ownload" i],
|
| 193 |
+
.banner-logo-image [aria-label*="ullscreen" i],
|
| 194 |
+
.banner-logo-image button[title*="hare" i],
|
| 195 |
+
.banner-logo-image button[title*="ownload" i],
|
| 196 |
+
.banner-logo-image button[title*="ullscreen" i] {
|
| 197 |
display: none !important;
|
| 198 |
}
|
| 199 |
|
|
|
|
| 220 |
letter-spacing: 0.1em;
|
| 221 |
text-transform: uppercase;
|
| 222 |
color: #2563eb;
|
| 223 |
+
margin: 0 0 12px 0;
|
|
|
|
|
|
|
| 224 |
}
|
| 225 |
|
| 226 |
/* --- ICON GRID (Paper / Code / Dataset / Model) --- */
|
|
|
|
| 295 |
background: transparent !important;
|
| 296 |
}
|
| 297 |
|
| 298 |
+
/* Inside our white section-cards, every nested Gradio wrapper must be FLAT
|
| 299 |
+
(no border / shadow / background), otherwise the auto-form Gradio inserts
|
| 300 |
+
around consecutive Dropdown+Slider components shows up as a "card inside card".
|
| 301 |
+
We override the relevant CSS variables locally + add explicit overrides. */
|
| 302 |
+
.section-card {
|
| 303 |
+
--block-shadow: none;
|
| 304 |
+
--block-shadow-dark: none;
|
| 305 |
+
--block-background-fill: transparent;
|
| 306 |
+
--block-border-color: transparent;
|
| 307 |
+
--block-border-width: 0px;
|
| 308 |
+
--panel-background-fill: transparent;
|
| 309 |
+
--panel-border-width: 0px;
|
| 310 |
+
--background-fill-secondary: transparent;
|
| 311 |
+
}
|
| 312 |
.section-card .block,
|
| 313 |
.section-card .form,
|
| 314 |
.section-card .gr-form,
|
| 315 |
.section-card .gr-block,
|
| 316 |
.section-card .gr-panel,
|
| 317 |
+
.section-card .gr-group,
|
| 318 |
.section-card .gradio-dropdown,
|
| 319 |
.section-card .gradio-slider,
|
| 320 |
.section-card .gradio-textbox,
|
| 321 |
.section-card .gradio-markdown,
|
| 322 |
+
.section-card .gradio-code,
|
| 323 |
+
.section-card > div > div,
|
| 324 |
+
.section-card > div > div > div {
|
| 325 |
background: transparent !important;
|
| 326 |
border: none !important;
|
| 327 |
box-shadow: none !important;
|
| 328 |
padding: 0 !important;
|
| 329 |
}
|
| 330 |
+
/* Re-add tasteful spacing inside a card (we just stripped padding above). */
|
| 331 |
+
.section-card .form,
|
| 332 |
+
.section-card .gr-form,
|
| 333 |
+
.section-card > div > div {
|
| 334 |
+
display: flex;
|
| 335 |
+
flex-direction: column;
|
| 336 |
+
gap: 14px;
|
| 337 |
+
}
|
| 338 |
|
| 339 |
/* Direct children of a card get vertical rhythm without extra chrome. */
|
| 340 |
.section-card > * + * { margin-top: 14px; }
|
|
|
|
| 478 |
color: #0f2744 !important;
|
| 479 |
border: none !important;
|
| 480 |
}
|
| 481 |
+
[class*="gradio-container"] .codemirror-wrapper,
|
| 482 |
+
[class*="gradio-container"] .cm-editor {
|
| 483 |
+
border-radius: 14px !important;
|
| 484 |
+
overflow: hidden !important;
|
| 485 |
+
}
|
| 486 |
[class*="gradio-container"] .cm-gutters {
|
| 487 |
border-right: 1px solid #dbeafe !important;
|
| 488 |
color: #6b86a6 !important;
|
| 489 |
}
|
| 490 |
|
| 491 |
+
/* --- GLOBAL ROUNDED CORNERS: kill any leftover right-angle frames --- */
|
| 492 |
+
[class*="gradio-container"] .block,
|
| 493 |
+
[class*="gradio-container"] .form,
|
| 494 |
+
[class*="gradio-container"] .gr-box,
|
| 495 |
+
[class*="gradio-container"] .gr-panel,
|
| 496 |
+
[class*="gradio-container"] .gr-group,
|
| 497 |
+
[class*="gradio-container"] [data-testid="textbox"],
|
| 498 |
+
[class*="gradio-container"] [data-testid="dropdown"],
|
| 499 |
+
[class*="gradio-container"] .tabitem,
|
| 500 |
+
[class*="gradio-container"] .tab-content,
|
| 501 |
+
[class*="gradio-container"] .gradio-markdown,
|
| 502 |
+
[class*="gradio-container"] .gradio-code {
|
| 503 |
+
border-radius: 16px !important;
|
| 504 |
+
}
|
| 505 |
+
[class*="gradio-container"] button {
|
| 506 |
+
border-radius: 12px !important;
|
| 507 |
+
}
|
| 508 |
+
|
| 509 |
/* --- "Try Examples" preset buttons --- */
|
| 510 |
.inline-example-title {
|
| 511 |
font-size: 0.72rem;
|
|
|
|
| 857 |
|
| 858 |
with gr.Group(elem_classes="section-card"):
|
| 859 |
gr.HTML('<div class="section-heading">Try Examples</div>')
|
|
|
|
| 860 |
with gr.Column(elem_classes="example-buttons"):
|
| 861 |
ex1_btn = gr.Button("π Plan a 2-day Tokyo trip under $250 with trade-offs", variant="secondary")
|
| 862 |
ex2_btn = gr.Button("π€ Compare 3 open-source coding agents with pros/cons", variant="secondary")
|
| 863 |
ex3_btn = gr.Button("βοΈ RAG vs fine-tuning for legal QA: which and why?", variant="secondary")
|
| 864 |
|
| 865 |
with gr.Group(elem_classes="section-card"):
|
|
|
|
| 866 |
with gr.Tabs():
|
| 867 |
with gr.TabItem("Result"):
|
| 868 |
answer = gr.Markdown(label="Final Answer")
|