Apply cleaner palette and move try examples to left panel
Browse files
app.py
CHANGED
|
@@ -66,7 +66,8 @@ CUSTOM_CSS = """
|
|
| 66 |
.gradio-container {
|
| 67 |
max-width: 1200px !important;
|
| 68 |
font-family: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
|
| 69 |
-
background: #
|
|
|
|
| 70 |
}
|
| 71 |
|
| 72 |
.gradio-container * {
|
|
@@ -95,12 +96,12 @@ CUSTOM_CSS = """
|
|
| 95 |
|
| 96 |
.banner-logo-image img {
|
| 97 |
width: 100%;
|
| 98 |
-
max-width:
|
| 99 |
height: auto;
|
| 100 |
object-fit: contain;
|
| 101 |
-
border-radius:
|
| 102 |
-
background:
|
| 103 |
-
border:
|
| 104 |
}
|
| 105 |
|
| 106 |
.banner-title {
|
|
@@ -134,7 +135,7 @@ CUSTOM_CSS = """
|
|
| 134 |
}
|
| 135 |
|
| 136 |
.layout-gap {
|
| 137 |
-
gap:
|
| 138 |
}
|
| 139 |
|
| 140 |
.right-stack > * {
|
|
@@ -153,18 +154,35 @@ CUSTOM_CSS = """
|
|
| 153 |
justify-content: center;
|
| 154 |
gap: 6px;
|
| 155 |
padding: 7px 8px;
|
| 156 |
-
border:
|
| 157 |
-
border-radius:
|
| 158 |
text-decoration: none !important;
|
| 159 |
-
color: #
|
| 160 |
-
background:
|
| 161 |
font-weight: 600;
|
| 162 |
font-size: 12px;
|
| 163 |
}
|
| 164 |
|
| 165 |
.icon-link:hover {
|
| 166 |
-
background: #
|
| 167 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 168 |
}
|
| 169 |
|
| 170 |
.gradio-container .gr-group,
|
|
@@ -193,6 +211,18 @@ CUSTOM_CSS = """
|
|
| 193 |
.gradio-container textarea,
|
| 194 |
.gradio-container input {
|
| 195 |
background: #ffffff !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 196 |
}
|
| 197 |
"""
|
| 198 |
|
|
@@ -504,6 +534,18 @@ with gr.Blocks(
|
|
| 504 |
stop_btn = gr.Button("Stop", variant="stop", size="lg")
|
| 505 |
clear_btn = gr.Button("Clear", variant="secondary", size="lg")
|
| 506 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 507 |
with gr.Group(elem_classes="section-card"):
|
| 508 |
with gr.Tabs():
|
| 509 |
with gr.TabItem("Result"):
|
|
@@ -552,18 +594,6 @@ with gr.Blocks(
|
|
| 552 |
label="Temperature", minimum=0.0, maximum=1.5, value=0.4, step=0.1
|
| 553 |
)
|
| 554 |
|
| 555 |
-
with gr.Group(elem_classes="section-card"):
|
| 556 |
-
gr.HTML('<div class="section-title">Recommended Dialogues</div>')
|
| 557 |
-
gr.Examples(
|
| 558 |
-
examples=[
|
| 559 |
-
["Compare RAG and fine-tuning: trade-offs, cost, and when to use each."],
|
| 560 |
-
["Summarize the differences between Qwen2.5, Llama 3.1, and Mistral 7B for agent tasks."],
|
| 561 |
-
["What are the key design patterns for long-context research agents?"],
|
| 562 |
-
],
|
| 563 |
-
inputs=question,
|
| 564 |
-
label="",
|
| 565 |
-
)
|
| 566 |
-
|
| 567 |
run_event = run_btn.click(
|
| 568 |
fn=run_ui,
|
| 569 |
inputs=[question, model, max_turns, max_search_results, temperature],
|
|
|
|
| 66 |
.gradio-container {
|
| 67 |
max-width: 1200px !important;
|
| 68 |
font-family: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
|
| 69 |
+
background: #fcfdff !important;
|
| 70 |
+
color: #0f172a;
|
| 71 |
}
|
| 72 |
|
| 73 |
.gradio-container * {
|
|
|
|
| 96 |
|
| 97 |
.banner-logo-image img {
|
| 98 |
width: 100%;
|
| 99 |
+
max-width: 360px;
|
| 100 |
height: auto;
|
| 101 |
object-fit: contain;
|
| 102 |
+
border-radius: 0;
|
| 103 |
+
background: transparent;
|
| 104 |
+
border: none;
|
| 105 |
}
|
| 106 |
|
| 107 |
.banner-title {
|
|
|
|
| 135 |
}
|
| 136 |
|
| 137 |
.layout-gap {
|
| 138 |
+
gap: 18px;
|
| 139 |
}
|
| 140 |
|
| 141 |
.right-stack > * {
|
|
|
|
| 154 |
justify-content: center;
|
| 155 |
gap: 6px;
|
| 156 |
padding: 7px 8px;
|
| 157 |
+
border: none;
|
| 158 |
+
border-radius: 8px;
|
| 159 |
text-decoration: none !important;
|
| 160 |
+
color: #1e3a8a !important;
|
| 161 |
+
background: transparent;
|
| 162 |
font-weight: 600;
|
| 163 |
font-size: 12px;
|
| 164 |
}
|
| 165 |
|
| 166 |
.icon-link:hover {
|
| 167 |
+
background: #eef4ff;
|
| 168 |
+
}
|
| 169 |
+
|
| 170 |
+
.gradio-container .gr-button-primary {
|
| 171 |
+
background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%) !important;
|
| 172 |
+
color: white !important;
|
| 173 |
+
border: none !important;
|
| 174 |
+
}
|
| 175 |
+
|
| 176 |
+
.gradio-container .gr-button-secondary {
|
| 177 |
+
background: #eef4ff !important;
|
| 178 |
+
color: #1e3a8a !important;
|
| 179 |
+
border: none !important;
|
| 180 |
+
}
|
| 181 |
+
|
| 182 |
+
.gradio-container .gr-button-stop {
|
| 183 |
+
background: #fee2e2 !important;
|
| 184 |
+
color: #991b1b !important;
|
| 185 |
+
border: none !important;
|
| 186 |
}
|
| 187 |
|
| 188 |
.gradio-container .gr-group,
|
|
|
|
| 211 |
.gradio-container textarea,
|
| 212 |
.gradio-container input {
|
| 213 |
background: #ffffff !important;
|
| 214 |
+
border-color: #dbe7ff !important;
|
| 215 |
+
}
|
| 216 |
+
|
| 217 |
+
.gradio-container .gr-markdown a {
|
| 218 |
+
color: #1e40af !important;
|
| 219 |
+
}
|
| 220 |
+
|
| 221 |
+
.inline-example-title {
|
| 222 |
+
font-size: 13px;
|
| 223 |
+
font-weight: 700;
|
| 224 |
+
color: #475569;
|
| 225 |
+
margin: 8px 0 2px 0;
|
| 226 |
}
|
| 227 |
"""
|
| 228 |
|
|
|
|
| 534 |
stop_btn = gr.Button("Stop", variant="stop", size="lg")
|
| 535 |
clear_btn = gr.Button("Clear", variant="secondary", size="lg")
|
| 536 |
|
| 537 |
+
with gr.Group(elem_classes="section-card"):
|
| 538 |
+
gr.HTML('<div class="inline-example-title">Try Examples</div>')
|
| 539 |
+
gr.Examples(
|
| 540 |
+
examples=[
|
| 541 |
+
["Plan a 2-day food + museum itinerary in Tokyo under $250, with trade-offs."],
|
| 542 |
+
["Find 3 open-source coding agents and compare real strengths/limitations."],
|
| 543 |
+
["Explain whether RAG or fine-tuning is better for a legal QA assistant, and why."],
|
| 544 |
+
],
|
| 545 |
+
inputs=question,
|
| 546 |
+
label="",
|
| 547 |
+
)
|
| 548 |
+
|
| 549 |
with gr.Group(elem_classes="section-card"):
|
| 550 |
with gr.Tabs():
|
| 551 |
with gr.TabItem("Result"):
|
|
|
|
| 594 |
label="Temperature", minimum=0.0, maximum=1.5, value=0.4, step=0.1
|
| 595 |
)
|
| 596 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 597 |
run_event = run_btn.click(
|
| 598 |
fn=run_ui,
|
| 599 |
inputs=[question, model, max_turns, max_search_results, temperature],
|