Spaces:
Running
Running
Food Desert commited on
Commit ·
3aa1163
1
Parent(s): 82fe126
Refine UI guidance, tag toggle cues, and hover tooltip metadata
Browse files- app.py +29 -7
- data/runtime_metrics/ui_pipeline_timings.jsonl +6 -0
app.py
CHANGED
|
@@ -852,18 +852,18 @@ css = """
|
|
| 852 |
display: inline-flex !important;
|
| 853 |
align-items: center !important;
|
| 854 |
min-height: 40px !important;
|
| 855 |
-
padding: 10px 15px 9px !important;
|
| 856 |
-
border:
|
| 857 |
border-radius: 10px !important;
|
| 858 |
-
background: linear-gradient(180deg, #
|
| 859 |
-
color: #
|
| 860 |
font-size: 0.97rem !important;
|
| 861 |
font-weight: 800 !important;
|
| 862 |
line-height: 1.15 !important;
|
| 863 |
cursor: pointer !important;
|
| 864 |
user-select: none !important;
|
| 865 |
letter-spacing: 0.01em !important;
|
| 866 |
-
box-shadow: 0
|
| 867 |
transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.08s ease !important;
|
| 868 |
}
|
| 869 |
|
|
@@ -881,6 +881,21 @@ css = """
|
|
| 881 |
pointer-events: none !important;
|
| 882 |
}
|
| 883 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 884 |
/* Bright color cycle used only when selected */
|
| 885 |
.lego-tags label:nth-child(8n+1) span { --on-bg1: #ffd166; --on-bg2: #f39c4a; --on-border: #b86e21; --on-text: #2e1706; }
|
| 886 |
.lego-tags label:nth-child(8n+2) span { --on-bg1: #6ee7ff; --on-bg2: #1fb7ff; --on-border: #157cb3; --on-text: #07263c; }
|
|
@@ -951,6 +966,12 @@ css = """
|
|
| 951 |
0 6px 0 rgba(0,0,0,0.32) !important;
|
| 952 |
}
|
| 953 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 954 |
.source-legend {
|
| 955 |
display: flex;
|
| 956 |
flex-wrap: wrap;
|
|
@@ -1031,6 +1052,7 @@ css = """
|
|
| 1031 |
color: #475569 !important;
|
| 1032 |
}
|
| 1033 |
|
|
|
|
| 1034 |
.prompt-card {
|
| 1035 |
background: transparent !important;
|
| 1036 |
border: none !important;
|
|
@@ -1500,11 +1522,11 @@ with gr.Blocks(css=css, js=client_js) as app:
|
|
| 1500 |
)
|
| 1501 |
with gr.Group(elem_classes=["prompt-card", "suggested-prompt-card"]):
|
| 1502 |
suggested_prompt = gr.Textbox(
|
| 1503 |
-
label="Suggested Prompt",
|
| 1504 |
lines=2,
|
| 1505 |
interactive=False,
|
| 1506 |
show_copy_button=True,
|
| 1507 |
-
placeholder=
|
| 1508 |
elem_classes=["suggested-prompt-box"],
|
| 1509 |
)
|
| 1510 |
with gr.Column(scale=1):
|
|
|
|
| 852 |
display: inline-flex !important;
|
| 853 |
align-items: center !important;
|
| 854 |
min-height: 40px !important;
|
| 855 |
+
padding: 10px 15px 9px 22px !important;
|
| 856 |
+
border: 1px solid #9aa6b8 !important;
|
| 857 |
border-radius: 10px !important;
|
| 858 |
+
background: linear-gradient(180deg, #dfe5ee 0%, #bec8d6 100%) !important;
|
| 859 |
+
color: #364254 !important;
|
| 860 |
font-size: 0.97rem !important;
|
| 861 |
font-weight: 800 !important;
|
| 862 |
line-height: 1.15 !important;
|
| 863 |
cursor: pointer !important;
|
| 864 |
user-select: none !important;
|
| 865 |
letter-spacing: 0.01em !important;
|
| 866 |
+
box-shadow: 0 3px 0 rgba(0,0,0,0.16), inset 0 1px 0 rgba(255,255,255,0.55) !important;
|
| 867 |
transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.08s ease !important;
|
| 868 |
}
|
| 869 |
|
|
|
|
| 881 |
pointer-events: none !important;
|
| 882 |
}
|
| 883 |
|
| 884 |
+
/* Unselected cue: show "+" on the left. */
|
| 885 |
+
.lego-tags input[type="checkbox"] + span::after,
|
| 886 |
+
.lego-tags input[type="checkbox"] ~ span::after {
|
| 887 |
+
content: "+" !important;
|
| 888 |
+
position: absolute !important;
|
| 889 |
+
left: 6px !important;
|
| 890 |
+
top: 50% !important;
|
| 891 |
+
transform: translateY(-52%) !important;
|
| 892 |
+
font-size: 1rem !important;
|
| 893 |
+
font-weight: 900 !important;
|
| 894 |
+
color: #4b5563 !important;
|
| 895 |
+
opacity: 0.95 !important;
|
| 896 |
+
pointer-events: none !important;
|
| 897 |
+
}
|
| 898 |
+
|
| 899 |
/* Bright color cycle used only when selected */
|
| 900 |
.lego-tags label:nth-child(8n+1) span { --on-bg1: #ffd166; --on-bg2: #f39c4a; --on-border: #b86e21; --on-text: #2e1706; }
|
| 901 |
.lego-tags label:nth-child(8n+2) span { --on-bg1: #6ee7ff; --on-bg2: #1fb7ff; --on-border: #157cb3; --on-text: #07263c; }
|
|
|
|
| 966 |
0 6px 0 rgba(0,0,0,0.32) !important;
|
| 967 |
}
|
| 968 |
|
| 969 |
+
.lego-tags input[type="checkbox"]:checked + span::after,
|
| 970 |
+
.lego-tags input[type="checkbox"]:checked ~ span::after,
|
| 971 |
+
.lego-tags label:has(input[type="checkbox"]:checked) span::after {
|
| 972 |
+
content: "" !important;
|
| 973 |
+
}
|
| 974 |
+
|
| 975 |
.source-legend {
|
| 976 |
display: flex;
|
| 977 |
flex-wrap: wrap;
|
|
|
|
| 1052 |
color: #475569 !important;
|
| 1053 |
}
|
| 1054 |
|
| 1055 |
+
|
| 1056 |
.prompt-card {
|
| 1057 |
background: transparent !important;
|
| 1058 |
border: none !important;
|
|
|
|
| 1522 |
)
|
| 1523 |
with gr.Group(elem_classes=["prompt-card", "suggested-prompt-card"]):
|
| 1524 |
suggested_prompt = gr.Textbox(
|
| 1525 |
+
label="Suggested Prompt (Read-only)",
|
| 1526 |
lines=2,
|
| 1527 |
interactive=False,
|
| 1528 |
show_copy_button=True,
|
| 1529 |
+
placeholder='Suggested prompt will appear here after you click "Run".',
|
| 1530 |
elem_classes=["suggested-prompt-box"],
|
| 1531 |
)
|
| 1532 |
with gr.Column(scale=1):
|
data/runtime_metrics/ui_pipeline_timings.jsonl
CHANGED
|
@@ -58,3 +58,9 @@
|
|
| 58 |
{"timestamp_utc": "2026-03-07T18:11:33Z", "stages_s": {"preprocess": 8.610001532360911e-05, "rewrite": 1.9479332999908365, "structural": 1.865794699988328, "probe": 0.06017700000666082, "retrieval": 2.0440989999915473, "selection": 2.4227961000287905, "implication_expansion": 0.28120840003248304, "prompt_composition": 2.069998299703002e-05, "group_display": 0.0792113000061363}, "total_s": 8.734649899997748, "config": {"timeout_rewrite_s": 45.0, "timeout_struct_s": 45.0, "timeout_probe_s": 45.0, "timeout_select_s": 45.0}}
|
| 59 |
{"timestamp_utc": "2026-03-07T18:17:24Z", "stages_s": {"preprocess": 0.00012939999578520656, "rewrite": 3.181579700030852, "structural": 0.45629230001941323, "probe": 4.243250800005626, "retrieval": 2.128536299976986, "selection": 4.2171271000406705, "implication_expansion": 0.29443830001400784, "prompt_composition": 2.110004425048828e-05, "group_display": 0.0817057000240311}, "total_s": 14.642313299991656, "config": {"timeout_rewrite_s": 45.0, "timeout_struct_s": 45.0, "timeout_probe_s": 45.0, "timeout_select_s": 45.0}}
|
| 60 |
{"timestamp_utc": "2026-03-07T18:20:15Z", "stages_s": {"preprocess": 9.400013368576765e-06, "rewrite": 0.9211662000161596, "structural": 0.49053100001765415, "probe": 0.4501308999606408, "retrieval": 0.08053859998472035, "selection": 1.9059181000338867, "implication_expansion": 3.290001768618822e-05, "prompt_composition": 1.8200022168457508e-05, "group_display": 0.0299964000005275}, "total_s": 3.888701299962122, "config": {"timeout_rewrite_s": 45.0, "timeout_struct_s": 45.0, "timeout_probe_s": 45.0, "timeout_select_s": 45.0}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
{"timestamp_utc": "2026-03-07T18:11:33Z", "stages_s": {"preprocess": 8.610001532360911e-05, "rewrite": 1.9479332999908365, "structural": 1.865794699988328, "probe": 0.06017700000666082, "retrieval": 2.0440989999915473, "selection": 2.4227961000287905, "implication_expansion": 0.28120840003248304, "prompt_composition": 2.069998299703002e-05, "group_display": 0.0792113000061363}, "total_s": 8.734649899997748, "config": {"timeout_rewrite_s": 45.0, "timeout_struct_s": 45.0, "timeout_probe_s": 45.0, "timeout_select_s": 45.0}}
|
| 59 |
{"timestamp_utc": "2026-03-07T18:17:24Z", "stages_s": {"preprocess": 0.00012939999578520656, "rewrite": 3.181579700030852, "structural": 0.45629230001941323, "probe": 4.243250800005626, "retrieval": 2.128536299976986, "selection": 4.2171271000406705, "implication_expansion": 0.29443830001400784, "prompt_composition": 2.110004425048828e-05, "group_display": 0.0817057000240311}, "total_s": 14.642313299991656, "config": {"timeout_rewrite_s": 45.0, "timeout_struct_s": 45.0, "timeout_probe_s": 45.0, "timeout_select_s": 45.0}}
|
| 60 |
{"timestamp_utc": "2026-03-07T18:20:15Z", "stages_s": {"preprocess": 9.400013368576765e-06, "rewrite": 0.9211662000161596, "structural": 0.49053100001765415, "probe": 0.4501308999606408, "retrieval": 0.08053859998472035, "selection": 1.9059181000338867, "implication_expansion": 3.290001768618822e-05, "prompt_composition": 1.8200022168457508e-05, "group_display": 0.0299964000005275}, "total_s": 3.888701299962122, "config": {"timeout_rewrite_s": 45.0, "timeout_struct_s": 45.0, "timeout_probe_s": 45.0, "timeout_select_s": 45.0}}
|
| 61 |
+
{"timestamp_utc": "2026-03-07T18:25:13Z", "stages_s": {"preprocess": 7.489998824894428e-05, "rewrite": 2.0823733000434004, "structural": 2.191010400012601, "probe": 0.6742120999842882, "retrieval": 2.1646841000183485, "selection": 1.6050471999915317, "implication_expansion": 0.2715553000452928, "prompt_composition": 2.95999925583601e-05, "group_display": 0.0765118999988772}, "total_s": 9.099871499987785, "config": {"timeout_rewrite_s": 45.0, "timeout_struct_s": 45.0, "timeout_probe_s": 45.0, "timeout_select_s": 45.0}}
|
| 62 |
+
{"timestamp_utc": "2026-03-07T18:30:09Z", "stages_s": {"preprocess": 8.38999985717237e-05, "rewrite": 1.4399371999897994, "structural": 3.0618822000105865, "probe": 3.999972250312567e-06, "retrieval": 2.3843179999967106, "selection": 0.5073141999891959, "implication_expansion": 0.2820176999666728, "prompt_composition": 1.8900027498602867e-05, "group_display": 0.10325530002592131}, "total_s": 7.8115702999639325, "config": {"timeout_rewrite_s": 45.0, "timeout_struct_s": 45.0, "timeout_probe_s": 45.0, "timeout_select_s": 45.0}}
|
| 63 |
+
{"timestamp_utc": "2026-03-07T18:33:34Z", "stages_s": {"preprocess": 8.200004231184721e-05, "rewrite": 2.1479006999870762, "structural": 0.8750209999852814, "probe": 0.4590623999829404, "retrieval": 2.0185911000007764, "selection": 2.3227690999628976, "implication_expansion": 0.2682039000210352, "prompt_composition": 2.0799983758479357e-05, "group_display": 0.07744619995355606}, "total_s": 8.201989000022877, "config": {"timeout_rewrite_s": 45.0, "timeout_struct_s": 45.0, "timeout_probe_s": 45.0, "timeout_select_s": 45.0}}
|
| 64 |
+
{"timestamp_utc": "2026-03-07T18:37:01Z", "stages_s": {"preprocess": 8.750002598389983e-05, "rewrite": 1.9491858000401407, "structural": 0.8993617999949493, "probe": 0.6909401000011712, "retrieval": 1.9788297000341117, "selection": 2.007329899992328, "implication_expansion": 0.27369599998928607, "prompt_composition": 1.750001683831215e-05, "group_display": 0.07718170003499836}, "total_s": 7.910292099986691, "config": {"timeout_rewrite_s": 45.0, "timeout_struct_s": 45.0, "timeout_probe_s": 45.0, "timeout_select_s": 45.0}}
|
| 65 |
+
{"timestamp_utc": "2026-03-07T18:39:21Z", "stages_s": {"preprocess": 7.120001828297973e-05, "rewrite": 2.160051700018812, "structural": 2.0912121000001207, "probe": 5.999987479299307e-06, "retrieval": 2.686856299987994, "selection": 3.0833527999930084, "implication_expansion": 0.26943250000476837, "prompt_composition": 2.300000051036477e-05, "group_display": 0.08336449996568263}, "total_s": 10.40742639999371, "config": {"timeout_rewrite_s": 45.0, "timeout_struct_s": 45.0, "timeout_probe_s": 45.0, "timeout_select_s": 45.0}}
|
| 66 |
+
{"timestamp_utc": "2026-03-07T18:41:06Z", "stages_s": {"preprocess": 7.080001523718238e-05, "rewrite": 1.8015929000102915, "structural": 1.512229100044351, "probe": 0.7955919000087306, "retrieval": 2.0075382000068203, "selection": 2.2879457999952137, "implication_expansion": 0.2690370999625884, "prompt_composition": 2.0400038920342922e-05, "group_display": 0.07704860001103953}, "total_s": 8.783880100003444, "config": {"timeout_rewrite_s": 45.0, "timeout_struct_s": 45.0, "timeout_probe_s": 45.0, "timeout_select_s": 45.0}}
|