Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -261,94 +261,94 @@ button[role="tab"].selected {
|
|
| 261 |
border-color: #173a59 !important;
|
| 262 |
}
|
| 263 |
|
| 264 |
-
/*
|
| 265 |
-
.
|
| 266 |
-
.
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 272 |
color: #000000 !important;
|
| 273 |
font-weight: 700 !important;
|
| 274 |
opacity: 1 !important;
|
| 275 |
}
|
| 276 |
|
| 277 |
-
/*
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
.examples
|
| 281 |
-
.
|
| 282 |
-
|
| 283 |
-
.examples
|
| 284 |
-
.examples
|
| 285 |
-
.examples td,
|
| 286 |
-
.gradio-container .examples tr td {
|
| 287 |
background-color: #ffffff !important;
|
|
|
|
| 288 |
color: #000000 !important;
|
| 289 |
-
border-color: #ccd5de !important;
|
| 290 |
}
|
| 291 |
-
.examples
|
| 292 |
-
.examples
|
|
|
|
|
|
|
|
|
|
| 293 |
color: #000000 !important;
|
|
|
|
| 294 |
opacity: 1 !important;
|
| 295 |
}
|
| 296 |
|
| 297 |
-
/*
|
| 298 |
-
|
| 299 |
-
|
| 300 |
-
|
| 301 |
-
.
|
| 302 |
-
.examples tr:hover td,
|
| 303 |
-
.examples
|
| 304 |
-
.gradio-container .examples tr:hover td,
|
| 305 |
-
.
|
| 306 |
-
.
|
| 307 |
-
.
|
| 308 |
-
.examples
|
| 309 |
-
|
|
|
|
|
|
|
|
|
|
| 310 |
border-color: #173a59 !important;
|
| 311 |
}
|
| 312 |
|
| 313 |
-
|
| 314 |
-
|
| 315 |
-
|
| 316 |
-
.examples
|
| 317 |
-
.gradio-container .examples tr:hover td,
|
| 318 |
-
.gradio-container .examples
|
| 319 |
-
.examples
|
| 320 |
-
.examples tr
|
| 321 |
-
.examples tr
|
| 322 |
-
.
|
| 323 |
-
|
| 324 |
-
|
| 325 |
-
|
| 326 |
-
|
| 327 |
-
|
| 328 |
-
|
| 329 |
-
.examples button,
|
| 330 |
-
.examples
|
| 331 |
-
.examples .gallery-item
|
| 332 |
-
|
| 333 |
-
|
| 334 |
-
|
| 335 |
-
.
|
| 336 |
-
.examples [role="button"], .examples [role="button"] *,
|
| 337 |
-
.examples .gallery-item, .examples .gallery-item * {
|
| 338 |
-
color: #000000 !important;
|
| 339 |
-
}
|
| 340 |
-
.examples button:hover, .examples [role="button"]:hover, .examples .gallery-item:hover,
|
| 341 |
-
.examples button.selected, .examples [aria-selected="true"] {
|
| 342 |
-
background-color: #173a59 !important;
|
| 343 |
-
border-color: #173a59 !important;
|
| 344 |
-
}
|
| 345 |
-
.examples button:hover, .examples button:hover *,
|
| 346 |
-
.examples [role="button"]:hover, .examples [role="button"]:hover *,
|
| 347 |
-
.examples .gallery-item:hover, .examples .gallery-item:hover *,
|
| 348 |
-
.examples button.selected, .examples button.selected *,
|
| 349 |
-
.examples [aria-selected="true"], .examples [aria-selected="true"] * {
|
| 350 |
color: #ffffff !important;
|
| 351 |
-webkit-text-fill-color: #ffffff !important;
|
|
|
|
| 352 |
}
|
| 353 |
"""
|
| 354 |
|
|
@@ -765,7 +765,8 @@ with gr.Blocks(css=CUSTOM_CSS, theme=gr.themes.Base()) as demo:
|
|
| 765 |
["Users find login confusing. Stakeholders want optional sign-in where possible, a simpler user flow, faster completion, and fewer helpdesk calls."]
|
| 766 |
],
|
| 767 |
inputs=notes_input,
|
| 768 |
-
label="Sample Business Scenarios"
|
|
|
|
| 769 |
)
|
| 770 |
|
| 771 |
gr.HTML("</div></div>")
|
|
@@ -812,4 +813,4 @@ with gr.Blocks(css=CUSTOM_CSS, theme=gr.themes.Base()) as demo:
|
|
| 812 |
outputs=[notes_input, brd_output, stories_output, before_after_output]
|
| 813 |
)
|
| 814 |
|
| 815 |
-
demo.launch()
|
|
|
|
| 261 |
border-color: #173a59 !important;
|
| 262 |
}
|
| 263 |
|
| 264 |
+
/* =========================================================
|
| 265 |
+
EXAMPLES (gr.Examples -> gr.Dataset) STYLING
|
| 266 |
+
gr.Examples renders a gr.Dataset. Its root is .dataset, and the
|
| 267 |
+
clickable items are .gallery-item / table rows depending on type
|
| 268 |
+
(here, single-text examples render as a samples table OR as
|
| 269 |
+
gallery buttons depending on Gradio version). We scope everything
|
| 270 |
+
under our own .ba-examples class (set via elem_classes) and use
|
| 271 |
+
high-specificity selectors with the .gradio-container prefix to
|
| 272 |
+
beat Gradio's default grey :hover.
|
| 273 |
+
========================================================= */
|
| 274 |
+
|
| 275 |
+
/* Section label "Sample Business Scenarios" */
|
| 276 |
+
.gradio-container .ba-examples .label-wrap,
|
| 277 |
+
.gradio-container .ba-examples .label-wrap *,
|
| 278 |
+
.gradio-container .ba-examples > label,
|
| 279 |
+
.gradio-container .ba-examples > label * {
|
| 280 |
color: #000000 !important;
|
| 281 |
font-weight: 700 !important;
|
| 282 |
opacity: 1 !important;
|
| 283 |
}
|
| 284 |
|
| 285 |
+
/* ---- BASE (un-hovered) state ----
|
| 286 |
+
Cover every form the dataset items can take: table cells,
|
| 287 |
+
gallery items, and generic buttons. */
|
| 288 |
+
.gradio-container .ba-examples .dataset td,
|
| 289 |
+
.gradio-container .ba-examples table td,
|
| 290 |
+
.gradio-container .ba-examples .gallery-item,
|
| 291 |
+
.gradio-container .ba-examples button,
|
| 292 |
+
.gradio-container .ba-examples [role="button"] {
|
|
|
|
|
|
|
| 293 |
background-color: #ffffff !important;
|
| 294 |
+
border: 1px solid #ccd5de !important;
|
| 295 |
color: #000000 !important;
|
|
|
|
| 296 |
}
|
| 297 |
+
.gradio-container .ba-examples .dataset td *,
|
| 298 |
+
.gradio-container .ba-examples table td *,
|
| 299 |
+
.gradio-container .ba-examples .gallery-item *,
|
| 300 |
+
.gradio-container .ba-examples button *,
|
| 301 |
+
.gradio-container .ba-examples [role="button"] * {
|
| 302 |
color: #000000 !important;
|
| 303 |
+
-webkit-text-fill-color: #000000 !important;
|
| 304 |
opacity: 1 !important;
|
| 305 |
}
|
| 306 |
|
| 307 |
+
/* ---- HOVER / SELECTED state ----
|
| 308 |
+
This is the part that kept failing. Gradio applies its own grey
|
| 309 |
+
hover with high specificity, so we match the SAME elements and
|
| 310 |
+
force BOTH background and text. The .gradio-container prefix +
|
| 311 |
+
element + pseudo gives us enough specificity to win. */
|
| 312 |
+
.gradio-container .ba-examples .dataset tr:hover td,
|
| 313 |
+
.gradio-container .ba-examples .dataset td:hover,
|
| 314 |
+
.gradio-container .ba-examples table tr:hover td,
|
| 315 |
+
.gradio-container .ba-examples table td:hover,
|
| 316 |
+
.gradio-container .ba-examples .gallery-item:hover,
|
| 317 |
+
.gradio-container .ba-examples button:hover,
|
| 318 |
+
.gradio-container .ba-examples [role="button"]:hover,
|
| 319 |
+
.gradio-container .ba-examples .gallery-item.selected,
|
| 320 |
+
.gradio-container .ba-examples tr.selected td,
|
| 321 |
+
.gradio-container .ba-examples [aria-selected="true"] {
|
| 322 |
+
background-color: #173a59 !important; /* dark blue */
|
| 323 |
border-color: #173a59 !important;
|
| 324 |
}
|
| 325 |
|
| 326 |
+
/* Force the TEXT white on hover/selected — target the element itself
|
| 327 |
+
AND all descendants, with -webkit-text-fill-color to defeat any
|
| 328 |
+
webkit text-fill override. */
|
| 329 |
+
.gradio-container .ba-examples .dataset tr:hover td,
|
| 330 |
+
.gradio-container .ba-examples .dataset tr:hover td *,
|
| 331 |
+
.gradio-container .ba-examples .dataset td:hover,
|
| 332 |
+
.gradio-container .ba-examples .dataset td:hover *,
|
| 333 |
+
.gradio-container .ba-examples table tr:hover td,
|
| 334 |
+
.gradio-container .ba-examples table tr:hover td *,
|
| 335 |
+
.gradio-container .ba-examples table td:hover,
|
| 336 |
+
.gradio-container .ba-examples table td:hover *,
|
| 337 |
+
.gradio-container .ba-examples .gallery-item:hover,
|
| 338 |
+
.gradio-container .ba-examples .gallery-item:hover *,
|
| 339 |
+
.gradio-container .ba-examples button:hover,
|
| 340 |
+
.gradio-container .ba-examples button:hover *,
|
| 341 |
+
.gradio-container .ba-examples [role="button"]:hover,
|
| 342 |
+
.gradio-container .ba-examples [role="button"]:hover *,
|
| 343 |
+
.gradio-container .ba-examples .gallery-item.selected,
|
| 344 |
+
.gradio-container .ba-examples .gallery-item.selected *,
|
| 345 |
+
.gradio-container .ba-examples tr.selected td,
|
| 346 |
+
.gradio-container .ba-examples tr.selected td *,
|
| 347 |
+
.gradio-container .ba-examples [aria-selected="true"],
|
| 348 |
+
.gradio-container .ba-examples [aria-selected="true"] * {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 349 |
color: #ffffff !important;
|
| 350 |
-webkit-text-fill-color: #ffffff !important;
|
| 351 |
+
opacity: 1 !important;
|
| 352 |
}
|
| 353 |
"""
|
| 354 |
|
|
|
|
| 765 |
["Users find login confusing. Stakeholders want optional sign-in where possible, a simpler user flow, faster completion, and fewer helpdesk calls."]
|
| 766 |
],
|
| 767 |
inputs=notes_input,
|
| 768 |
+
label="Sample Business Scenarios",
|
| 769 |
+
elem_classes="ba-examples"
|
| 770 |
)
|
| 771 |
|
| 772 |
gr.HTML("</div></div>")
|
|
|
|
| 813 |
outputs=[notes_input, brd_output, stories_output, before_after_output]
|
| 814 |
)
|
| 815 |
|
| 816 |
+
demo.launch()
|