Spaces:
Sleeping
Sleeping
Cap to top 30 categories, hide gr.File X button, single-row buttons, no duplicate title
Browse files
app.py
CHANGED
|
@@ -171,6 +171,12 @@ footer { display: none !important; }
|
|
| 171 |
.upload-row svg { color: var(--ink-muted) !important; fill: var(--ink-muted) !important; }
|
| 172 |
.upload-row .file-preview, .upload-row [class*="FilePreview"] { display: none !important; }
|
| 173 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 174 |
/* File chip (after upload) */
|
| 175 |
.file-chip {
|
| 176 |
display: inline-flex;
|
|
@@ -234,6 +240,10 @@ textarea::placeholder { color: var(--ink-muted) !important; }
|
|
| 234 |
padding: 0 !important;
|
| 235 |
}
|
| 236 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 237 |
/* Buttons */
|
| 238 |
button.primary, button[variant="primary"], .gr-button.primary {
|
| 239 |
background: var(--ink) !important;
|
|
@@ -1056,11 +1066,11 @@ def build_app() -> gr.Blocks:
|
|
| 1056 |
)
|
| 1057 |
gr.HTML('<div class="kb-hint">Press Enter to send · Shift+Enter for newline</div>')
|
| 1058 |
|
| 1059 |
-
with gr.Row():
|
| 1060 |
-
ask_btn = gr.Button("Ask", variant="primary", size="sm")
|
| 1061 |
-
reset_btn = gr.Button("Clear", variant="secondary", size="sm")
|
| 1062 |
demo_btn = gr.Button("Demo", variant="secondary", size="sm",
|
| 1063 |
-
elem_id="load_demo_btn")
|
| 1064 |
|
| 1065 |
# ---------- RIGHT panel ----------
|
| 1066 |
with gr.Column(elem_classes=["split-right"], scale=1):
|
|
|
|
| 171 |
.upload-row svg { color: var(--ink-muted) !important; fill: var(--ink-muted) !important; }
|
| 172 |
.upload-row .file-preview, .upload-row [class*="FilePreview"] { display: none !important; }
|
| 173 |
|
| 174 |
+
/* Hide the gr.File "X clear" button (we have our own Clear button) */
|
| 175 |
+
.upload-row [class*="Remove"], .upload-row button[aria-label*="lear"],
|
| 176 |
+
.upload-row button[aria-label*="emove"], .upload-row .remove { display: none !important; }
|
| 177 |
+
.upload-row .file { padding: 0 !important; background: transparent !important; }
|
| 178 |
+
.upload-row [data-testid="file"] .download-link { display: none !important; }
|
| 179 |
+
|
| 180 |
/* File chip (after upload) */
|
| 181 |
.file-chip {
|
| 182 |
display: inline-flex;
|
|
|
|
| 240 |
padding: 0 !important;
|
| 241 |
}
|
| 242 |
|
| 243 |
+
/* Button row: keep all buttons in a single line, give Ask more weight */
|
| 244 |
+
.btn-row { gap: 8px !important; flex-wrap: nowrap !important; margin-top: 12px; }
|
| 245 |
+
.btn-row > * { min-width: 0 !important; }
|
| 246 |
+
|
| 247 |
/* Buttons */
|
| 248 |
button.primary, button[variant="primary"], .gr-button.primary {
|
| 249 |
background: var(--ink) !important;
|
|
|
|
| 1066 |
)
|
| 1067 |
gr.HTML('<div class="kb-hint">Press Enter to send · Shift+Enter for newline</div>')
|
| 1068 |
|
| 1069 |
+
with gr.Row(elem_classes=["btn-row"]):
|
| 1070 |
+
ask_btn = gr.Button("Ask", variant="primary", size="sm", scale=2)
|
| 1071 |
+
reset_btn = gr.Button("Clear", variant="secondary", size="sm", scale=1)
|
| 1072 |
demo_btn = gr.Button("Demo", variant="secondary", size="sm",
|
| 1073 |
+
elem_id="load_demo_btn", scale=1)
|
| 1074 |
|
| 1075 |
# ---------- RIGHT panel ----------
|
| 1076 |
with gr.Column(elem_classes=["split-right"], scale=1):
|