Commit ·
70bbd7b
1
Parent(s): 1856cd8
ui: move connection-error tip from action-row to Output header
Browse filesInline-placed next to the "Output" heading so users actually see it before
scrolling past it. .section-heading-row gives the heading a flex layout
that puts the tip on the right.
app.py
CHANGED
|
@@ -336,6 +336,13 @@ gradio-app > div {
|
|
| 336 |
color: var(--q-accent);
|
| 337 |
margin: 0 0 14px 0;
|
| 338 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 339 |
.hero-heading {
|
| 340 |
font-family: "Source Serif 4", "Source Serif Pro", ui-serif, Georgia, serif !important;
|
| 341 |
font-weight: 600 !important;
|
|
@@ -975,7 +982,16 @@ gradio-app > div {
|
|
| 975 |
|
| 976 |
/* === Example buttons ==================================================== */
|
| 977 |
.example-note { color: var(--q-muted); font-size: 13px; margin: 0 0 12px 0; line-height: 1.5; }
|
| 978 |
-
.connection-tip {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 979 |
.memory-help {
|
| 980 |
color: var(--q-muted);
|
| 981 |
font-size: 12.5px;
|
|
@@ -1932,11 +1948,6 @@ with gr.Blocks(
|
|
| 1932 |
run_btn = gr.Button("Run Research", variant="primary", size="lg")
|
| 1933 |
stop_btn = gr.Button("Stop", variant="stop", size="lg")
|
| 1934 |
clear_btn = gr.Button("Clear", variant="secondary", size="lg")
|
| 1935 |
-
gr.HTML(
|
| 1936 |
-
'<div class="connection-tip">'
|
| 1937 |
-
'If you see a connection error, please wait a moment and retry.'
|
| 1938 |
-
'</div>'
|
| 1939 |
-
)
|
| 1940 |
|
| 1941 |
with gr.Group(elem_classes="section-card"):
|
| 1942 |
gr.HTML(
|
|
@@ -1950,7 +1961,14 @@ with gr.Blocks(
|
|
| 1950 |
]
|
| 1951 |
|
| 1952 |
with gr.Group(elem_classes="section-card"):
|
| 1953 |
-
gr.HTML(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1954 |
with gr.Tabs():
|
| 1955 |
with gr.TabItem("Result"):
|
| 1956 |
answer = gr.Markdown(label="Final Answer")
|
|
|
|
| 336 |
color: var(--q-accent);
|
| 337 |
margin: 0 0 14px 0;
|
| 338 |
}
|
| 339 |
+
.section-heading-row {
|
| 340 |
+
display: flex;
|
| 341 |
+
align-items: baseline;
|
| 342 |
+
justify-content: space-between;
|
| 343 |
+
gap: 16px;
|
| 344 |
+
flex-wrap: wrap;
|
| 345 |
+
}
|
| 346 |
.hero-heading {
|
| 347 |
font-family: "Source Serif 4", "Source Serif Pro", ui-serif, Georgia, serif !important;
|
| 348 |
font-weight: 600 !important;
|
|
|
|
| 982 |
|
| 983 |
/* === Example buttons ==================================================== */
|
| 984 |
.example-note { color: var(--q-muted); font-size: 13px; margin: 0 0 12px 0; line-height: 1.5; }
|
| 985 |
+
.connection-tip {
|
| 986 |
+
/* Reset the uppercase / accent inherited from .section-heading so it reads
|
| 987 |
+
like a normal hint when placed inline next to a heading. */
|
| 988 |
+
color: var(--q-muted);
|
| 989 |
+
font-size: 12px;
|
| 990 |
+
font-weight: 500;
|
| 991 |
+
letter-spacing: 0;
|
| 992 |
+
text-transform: none;
|
| 993 |
+
line-height: 1.45;
|
| 994 |
+
}
|
| 995 |
.memory-help {
|
| 996 |
color: var(--q-muted);
|
| 997 |
font-size: 12.5px;
|
|
|
|
| 1948 |
run_btn = gr.Button("Run Research", variant="primary", size="lg")
|
| 1949 |
stop_btn = gr.Button("Stop", variant="stop", size="lg")
|
| 1950 |
clear_btn = gr.Button("Clear", variant="secondary", size="lg")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1951 |
|
| 1952 |
with gr.Group(elem_classes="section-card"):
|
| 1953 |
gr.HTML(
|
|
|
|
| 1961 |
]
|
| 1962 |
|
| 1963 |
with gr.Group(elem_classes="section-card"):
|
| 1964 |
+
gr.HTML(
|
| 1965 |
+
'<div class="section-heading section-heading-row">'
|
| 1966 |
+
'<span>Output</span>'
|
| 1967 |
+
'<span class="connection-tip">'
|
| 1968 |
+
'If you see a connection error, please wait a moment and retry.'
|
| 1969 |
+
'</span>'
|
| 1970 |
+
'</div>'
|
| 1971 |
+
)
|
| 1972 |
with gr.Tabs():
|
| 1973 |
with gr.TabItem("Result"):
|
| 1974 |
answer = gr.Markdown(label="Final Answer")
|