Update app.py
Browse files
app.py
CHANGED
|
@@ -105,6 +105,8 @@ def explain_node(evt: gr.SelectData, df_state):
|
|
| 105 |
return gr.update(visible=False), ""
|
| 106 |
|
| 107 |
with gr.Blocks(css=r"""
|
|
|
|
|
|
|
| 108 |
/* Tooltip helpers: add data-tip to any element with class .tip */
|
| 109 |
.tip { position: relative; cursor: help; }
|
| 110 |
.tip:hover::after{
|
|
@@ -130,9 +132,11 @@ with gr.Blocks(css=r"""
|
|
| 130 |
with gr.Tab("Lattice Table"):
|
| 131 |
out_md = gr.Markdown()
|
| 132 |
out_df = gr.Dataframe(
|
| 133 |
-
interactive=False,
|
|
|
|
|
|
|
| 134 |
label="Scores by node (click a row for a simple explanation)",
|
| 135 |
-
|
| 136 |
)
|
| 137 |
with gr.Accordion("Node explanation", open=True, visible=False) as node_popup:
|
| 138 |
node_text = gr.Markdown()
|
|
|
|
| 105 |
return gr.update(visible=False), ""
|
| 106 |
|
| 107 |
with gr.Blocks(css=r"""
|
| 108 |
+
.scrollable-table { max-height: 420px; overflow-y: auto; }
|
| 109 |
+
|
| 110 |
/* Tooltip helpers: add data-tip to any element with class .tip */
|
| 111 |
.tip { position: relative; cursor: help; }
|
| 112 |
.tip:hover::after{
|
|
|
|
| 132 |
with gr.Tab("Lattice Table"):
|
| 133 |
out_md = gr.Markdown()
|
| 134 |
out_df = gr.Dataframe(
|
| 135 |
+
interactive=False,
|
| 136 |
+
wrap=True,
|
| 137 |
+
headers=["group", "name", "score"],
|
| 138 |
label="Scores by node (click a row for a simple explanation)",
|
| 139 |
+
elem_classes=["scrollable-table"]
|
| 140 |
)
|
| 141 |
with gr.Accordion("Node explanation", open=True, visible=False) as node_popup:
|
| 142 |
node_text = gr.Markdown()
|