Add project page and code links under the title
Browse filesA line of plain text links below the TTB-DVSM title: Project Page / Code,
opening in a new tab (the Space runs in an iframe). The arXiv link is
prepared but left out until ARXIV_URL is filled in.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
app.py
CHANGED
|
@@ -625,8 +625,38 @@ input[type='range']::-moz-range-thumb { background: #76B900 !important; }
|
|
| 625 |
leftover space, leaving the left column looking fixed). */
|
| 626 |
.col-left { flex: 1 1 0 !important; min-width: 260px; }
|
| 627 |
.col-right { flex: 3 1 0 !important; min-width: 360px; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 628 |
"""
|
| 629 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 630 |
# Slider coupling (frames, width) -> the largest value of the OTHER slider that
|
| 631 |
# still fits frames * width^2 <= _SLIDER_BUDGET, never raising it.
|
| 632 |
_FIT_WIDTH_JS = f"""(n, w) => {{
|
|
@@ -653,6 +683,7 @@ with gr.Blocks(title="TTB-DVSM (ZeroGPU)", delete_cache=(3600, 3600)) as demo:
|
|
| 653 |
# Full-width description on top.
|
| 654 |
gr.HTML(
|
| 655 |
"<h1 style='margin-bottom:0.1em;color:#76B900'>TTB-DVSM</h1>"
|
|
|
|
| 656 |
"<p style='color:var(--body-text-color);font-size:1.1em;margin-top:0.5em;line-height:1.6'>"
|
| 657 |
"TTB bakes the scene into fast weights in a single forward pass, "
|
| 658 |
"and the result is browseable in the viser viewer."
|
|
|
|
| 625 |
leftover space, leaving the left column looking fixed). */
|
| 626 |
.col-left { flex: 1 1 0 !important; min-width: 260px; }
|
| 627 |
.col-right { flex: 3 1 0 !important; min-width: 360px; }
|
| 628 |
+
/* Header text links under the title (see _header_links): a quiet grey line,
|
| 629 |
+
brighter and underlined on hover. Overrides what Gradio gives every <a> in an
|
| 630 |
+
HTML block (button-like padding, centred text, its own link colour). The
|
| 631 |
+
light theme gets darker greys so the line stays readable on white. */
|
| 632 |
+
.ttb-links { display: flex; flex-wrap: wrap; gap: 0 0.6em; font-size: 1em; line-height: 1.6; margin-top: 0.15em; }
|
| 633 |
+
.ttb-links a {
|
| 634 |
+
padding: 0 !important; text-align: left !important; font-weight: 400;
|
| 635 |
+
color: var(--neutral-500) !important; text-decoration: none !important;
|
| 636 |
+
}
|
| 637 |
+
.dark .ttb-links a { color: var(--body-text-color-subdued) !important; }
|
| 638 |
+
.ttb-links a:hover { color: var(--body-text-color) !important; text-decoration: underline !important; }
|
| 639 |
+
.dark .ttb-links a:hover { color: var(--body-text-color) !important; }
|
| 640 |
+
.ttb-links span { color: var(--neutral-300) !important; }
|
| 641 |
+
.dark .ttb-links span { color: var(--border-color-primary) !important; }
|
| 642 |
"""
|
| 643 |
|
| 644 |
+
# Paper / project page / code links shown as a line of text links under the
|
| 645 |
+
# title. A link with an empty URL is left out (the arXiv link, until the paper
|
| 646 |
+
# has its arXiv page).
|
| 647 |
+
ARXIV_URL = ""
|
| 648 |
+
PROJECT_URL = "https://test-time-baking.github.io/"
|
| 649 |
+
CODE_URL = "https://github.com/NVlabs/DVSM"
|
| 650 |
+
|
| 651 |
+
|
| 652 |
+
def _header_links() -> str:
|
| 653 |
+
links = [("arXiv", ARXIV_URL), ("Project Page", PROJECT_URL), ("Code", CODE_URL)]
|
| 654 |
+
# target=_blank: the Space runs in an iframe on huggingface.co.
|
| 655 |
+
return "<div class='ttb-links'>" + "<span>/</span>".join(
|
| 656 |
+
f"<a href='{url}' target='_blank' rel='noopener noreferrer'>{label}</a>"
|
| 657 |
+
for label, url in links if url) + "</div>"
|
| 658 |
+
|
| 659 |
+
|
| 660 |
# Slider coupling (frames, width) -> the largest value of the OTHER slider that
|
| 661 |
# still fits frames * width^2 <= _SLIDER_BUDGET, never raising it.
|
| 662 |
_FIT_WIDTH_JS = f"""(n, w) => {{
|
|
|
|
| 683 |
# Full-width description on top.
|
| 684 |
gr.HTML(
|
| 685 |
"<h1 style='margin-bottom:0.1em;color:#76B900'>TTB-DVSM</h1>"
|
| 686 |
+
+ _header_links() +
|
| 687 |
"<p style='color:var(--body-text-color);font-size:1.1em;margin-top:0.5em;line-height:1.6'>"
|
| 688 |
"TTB bakes the scene into fast weights in a single forward pass, "
|
| 689 |
"and the result is browseable in the viser viewer."
|