Update app.py
Browse files
app.py
CHANGED
|
@@ -217,6 +217,9 @@ CSS = """
|
|
| 217 |
.prob-bar {flex:1; background:#e5e7eb; height:12px; border-radius:6px; overflow:hidden;}
|
| 218 |
.prob-fill {height:12px; background:#6366f1;}
|
| 219 |
.small-note {font-size:0.9rem; color:#6b7280;}
|
|
|
|
|
|
|
|
|
|
| 220 |
"""
|
| 221 |
|
| 222 |
DESCRIPTION = """
|
|
@@ -241,15 +244,17 @@ with gr.Blocks(
|
|
| 241 |
probs_html = gr.HTML(label="Probabilities")
|
| 242 |
|
| 243 |
with gr.Accordion("Chunk details", open=False):
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
|
|
|
|
|
|
| 253 |
|
| 254 |
with gr.Tab("Advanced"):
|
| 255 |
gr.Markdown("Adjust chunking parameters below.")
|
|
|
|
| 217 |
.prob-bar {flex:1; background:#e5e7eb; height:12px; border-radius:6px; overflow:hidden;}
|
| 218 |
.prob-fill {height:12px; background:#6366f1;}
|
| 219 |
.small-note {font-size:0.9rem; color:#6b7280;}
|
| 220 |
+
#chunkbox {max-height:260px; overflow:auto;}
|
| 221 |
+
#details_note { font-size: 0.9rem; color: #6b7280; }
|
| 222 |
+
.gr-group { max-height: 260px; overflow: auto; }
|
| 223 |
"""
|
| 224 |
|
| 225 |
DESCRIPTION = """
|
|
|
|
| 244 |
probs_html = gr.HTML(label="Probabilities")
|
| 245 |
|
| 246 |
with gr.Accordion("Chunk details", open=False):
|
| 247 |
+
with gr.Group():
|
| 248 |
+
chunk_table = gr.Dataframe(
|
| 249 |
+
headers=["Chunk", "AI generated", "Human written"],
|
| 250 |
+
datatype=["number", "number", "number"],
|
| 251 |
+
label="Per-chunk probabilities",
|
| 252 |
+
wrap=True,
|
| 253 |
+
interactive=False,
|
| 254 |
+
row_count=(0, "dynamic"), # let rows grow
|
| 255 |
+
col_count=(3, "fixed"), # 3 fixed columns
|
| 256 |
+
)
|
| 257 |
+
details_md = gr.Markdown("", elem_id="details_note") # use elem_id for broad compatibility
|
| 258 |
|
| 259 |
with gr.Tab("Advanced"):
|
| 260 |
gr.Markdown("Adjust chunking parameters below.")
|