Commit ·
46481c4
1
Parent(s): bca1f37
ui: card-style resource links (paper/code/data/model) with icons; QUEST capitalization
Browse files- Open release sidebar block now uses .resource-card with SVG icons (paper, github) and HF emoji for data/model, two-line label (title + subtitle)
- Default URLs hardcoded for the four resources (paper/code/data/model) so they work even without env Secrets
- Capitalize "Quest" -> "QUEST" in the example-note line
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
app.py
CHANGED
|
@@ -32,10 +32,10 @@ DEFAULT_MODEL = QUEST_MODEL_ID
|
|
| 32 |
# Internal defaults. Search budget is no longer user-tunable.
|
| 33 |
DEFAULT_MAX_SEARCH_RESULTS = 10
|
| 34 |
|
| 35 |
-
PAPER_URL = os.getenv("PAPER_URL", "
|
| 36 |
-
CODE_URL = os.getenv("CODE_URL", "
|
| 37 |
-
DATASET_URL = os.getenv("DATASET_URL", "
|
| 38 |
-
MODEL_URL = os.getenv("MODEL_URL", "
|
| 39 |
|
| 40 |
|
| 41 |
# --- System prompt ---------------------------------------------------------
|
|
@@ -396,6 +396,68 @@ gradio-app > div {
|
|
| 396 |
transform: translateY(-1px);
|
| 397 |
}
|
| 398 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 399 |
/* === Buttons ============================================================ */
|
| 400 |
[class*="gradio-container"] button.primary,
|
| 401 |
[class*="gradio-container"] .gr-button-primary {
|
|
@@ -1873,7 +1935,7 @@ with gr.Blocks(
|
|
| 1873 |
with gr.Group(elem_classes="section-card"):
|
| 1874 |
gr.HTML(
|
| 1875 |
'<div class="section-heading">Try examples</div>'
|
| 1876 |
-
'<div class="example-note"><span class="quest-name">
|
| 1877 |
)
|
| 1878 |
with gr.Column(elem_classes="example-buttons"):
|
| 1879 |
example_buttons = [
|
|
@@ -1894,11 +1956,27 @@ with gr.Blocks(
|
|
| 1894 |
gr.HTML(
|
| 1895 |
f"""
|
| 1896 |
<div class="section-heading">Open release</div>
|
| 1897 |
-
<div class="
|
| 1898 |
-
<a class="
|
| 1899 |
-
|
| 1900 |
-
|
| 1901 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1902 |
</div>
|
| 1903 |
"""
|
| 1904 |
)
|
|
|
|
| 32 |
# Internal defaults. Search budget is no longer user-tunable.
|
| 33 |
DEFAULT_MAX_SEARCH_RESULTS = 10
|
| 34 |
|
| 35 |
+
PAPER_URL = os.getenv("PAPER_URL", "https://osu-nlp-group.github.io/quest-gh-test/")
|
| 36 |
+
CODE_URL = os.getenv("CODE_URL", "https://github.com/OSU-NLP-Group/QUEST")
|
| 37 |
+
DATASET_URL = os.getenv("DATASET_URL", "https://huggingface.co/collections/osunlp/quest")
|
| 38 |
+
MODEL_URL = os.getenv("MODEL_URL", "https://huggingface.co/osunlp/QUEST-35B-RL")
|
| 39 |
|
| 40 |
|
| 41 |
# --- System prompt ---------------------------------------------------------
|
|
|
|
| 396 |
transform: translateY(-1px);
|
| 397 |
}
|
| 398 |
|
| 399 |
+
/* Resource cards (paper / code / data / model) — icon + label, eye-catching */
|
| 400 |
+
.resource-grid {
|
| 401 |
+
display: grid;
|
| 402 |
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
| 403 |
+
gap: 10px;
|
| 404 |
+
width: 100%;
|
| 405 |
+
}
|
| 406 |
+
.resource-card {
|
| 407 |
+
display: flex;
|
| 408 |
+
align-items: center;
|
| 409 |
+
gap: 10px;
|
| 410 |
+
padding: 12px 14px;
|
| 411 |
+
border-radius: 14px;
|
| 412 |
+
text-decoration: none !important;
|
| 413 |
+
color: var(--q-text) !important;
|
| 414 |
+
background: var(--q-paper);
|
| 415 |
+
border: 1px solid var(--q-line-strong);
|
| 416 |
+
transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
|
| 417 |
+
}
|
| 418 |
+
.resource-card:hover {
|
| 419 |
+
background: var(--q-accent-soft);
|
| 420 |
+
border-color: var(--q-accent-line);
|
| 421 |
+
color: var(--q-accent) !important;
|
| 422 |
+
transform: translateY(-1px);
|
| 423 |
+
}
|
| 424 |
+
.resource-card-icon {
|
| 425 |
+
display: inline-flex;
|
| 426 |
+
align-items: center;
|
| 427 |
+
justify-content: center;
|
| 428 |
+
width: 30px;
|
| 429 |
+
height: 30px;
|
| 430 |
+
flex-shrink: 0;
|
| 431 |
+
border-radius: 8px;
|
| 432 |
+
background: var(--q-surface-alt);
|
| 433 |
+
color: var(--q-text);
|
| 434 |
+
}
|
| 435 |
+
.resource-card-icon svg {
|
| 436 |
+
width: 18px;
|
| 437 |
+
height: 18px;
|
| 438 |
+
fill: currentColor;
|
| 439 |
+
}
|
| 440 |
+
.resource-card-icon.resource-card-emoji {
|
| 441 |
+
background: transparent;
|
| 442 |
+
font-size: 22px;
|
| 443 |
+
line-height: 1;
|
| 444 |
+
}
|
| 445 |
+
.resource-card-text {
|
| 446 |
+
display: flex;
|
| 447 |
+
flex-direction: column;
|
| 448 |
+
line-height: 1.15;
|
| 449 |
+
min-width: 0;
|
| 450 |
+
}
|
| 451 |
+
.resource-card-text strong {
|
| 452 |
+
font-weight: 700;
|
| 453 |
+
font-size: 0.92rem;
|
| 454 |
+
}
|
| 455 |
+
.resource-card-text small {
|
| 456 |
+
font-size: 0.72rem;
|
| 457 |
+
color: var(--q-muted);
|
| 458 |
+
margin-top: 2px;
|
| 459 |
+
}
|
| 460 |
+
|
| 461 |
/* === Buttons ============================================================ */
|
| 462 |
[class*="gradio-container"] button.primary,
|
| 463 |
[class*="gradio-container"] .gr-button-primary {
|
|
|
|
| 1935 |
with gr.Group(elem_classes="section-card"):
|
| 1936 |
gr.HTML(
|
| 1937 |
'<div class="section-heading">Try examples</div>'
|
| 1938 |
+
'<div class="example-note"><span class="quest-name">QUEST</span> can handle multiple types of queries as shown below.</div>'
|
| 1939 |
)
|
| 1940 |
with gr.Column(elem_classes="example-buttons"):
|
| 1941 |
example_buttons = [
|
|
|
|
| 1956 |
gr.HTML(
|
| 1957 |
f"""
|
| 1958 |
<div class="section-heading">Open release</div>
|
| 1959 |
+
<div class="resource-grid">
|
| 1960 |
+
<a class="resource-card" href="{PAPER_URL}" target="_blank" rel="noopener noreferrer">
|
| 1961 |
+
<span class="resource-card-icon" aria-hidden="true">
|
| 1962 |
+
<svg viewBox="0 0 24 24" role="img" focusable="false"><path d="M6 2.5h8.2L19 7.3v14.2H6V2.5Zm8 1.9v3.2h3.2L14 4.4ZM8.1 9.8h8.8V8.4H8.1v1.4Zm0 3.3h8.8v-1.4H8.1v1.4Zm0 3.3h6.4V15H8.1v1.4Z"/></svg>
|
| 1963 |
+
</span>
|
| 1964 |
+
<span class="resource-card-text"><strong>Paper</strong><small>Blog</small></span>
|
| 1965 |
+
</a>
|
| 1966 |
+
<a class="resource-card" href="{CODE_URL}" target="_blank" rel="noopener noreferrer">
|
| 1967 |
+
<span class="resource-card-icon" aria-hidden="true">
|
| 1968 |
+
<svg viewBox="0 0 24 24" role="img" focusable="false"><path d="M12 1.8c-5.7 0-10.3 4.6-10.3 10.3 0 4.6 3 8.5 7.1 9.8.5.1.7-.2.7-.5v-1.8c-2.9.6-3.5-1.2-3.5-1.2-.5-1.2-1.1-1.5-1.1-1.5-.9-.6.1-.6.1-.6 1 .1 1.6 1.1 1.6 1.1.9 1.6 2.4 1.1 3 .8.1-.7.4-1.1.7-1.3-2.3-.3-4.7-1.2-4.7-5.1 0-1.1.4-2.1 1.1-2.8-.1-.3-.5-1.4.1-2.8 0 0 .9-.3 2.9 1.1.8-.2 1.7-.3 2.6-.3s1.8.1 2.6.3c2-1.4 2.9-1.1 2.9-1.1.6 1.4.2 2.5.1 2.8.7.8 1.1 1.7 1.1 2.8 0 4-2.4 4.8-4.7 5.1.4.3.7 1 .7 2v2.9c0 .3.2.6.7.5 4.1-1.4 7.1-5.2 7.1-9.8C22.3 6.4 17.7 1.8 12 1.8Z"/></svg>
|
| 1969 |
+
</span>
|
| 1970 |
+
<span class="resource-card-text"><strong>Code</strong><small>GitHub</small></span>
|
| 1971 |
+
</a>
|
| 1972 |
+
<a class="resource-card" href="{DATASET_URL}" target="_blank" rel="noopener noreferrer">
|
| 1973 |
+
<span class="resource-card-icon resource-card-emoji" aria-hidden="true">🤗</span>
|
| 1974 |
+
<span class="resource-card-text"><strong>Data</strong><small>Collection</small></span>
|
| 1975 |
+
</a>
|
| 1976 |
+
<a class="resource-card" href="{MODEL_URL}" target="_blank" rel="noopener noreferrer">
|
| 1977 |
+
<span class="resource-card-icon resource-card-emoji" aria-hidden="true">🤗</span>
|
| 1978 |
+
<span class="resource-card-text"><strong>Model</strong><small>QUEST-35B-RL</small></span>
|
| 1979 |
+
</a>
|
| 1980 |
</div>
|
| 1981 |
"""
|
| 1982 |
)
|