Commit ·
fb8faad
1
Parent(s): 2c39b7a
Reserve embedded report workspace height
Browse files
app.py
CHANGED
|
@@ -219,6 +219,7 @@ def run_scan(target: str):
|
|
| 219 |
result_json(result),
|
| 220 |
_write_sbom(result),
|
| 221 |
view_state,
|
|
|
|
| 222 |
)
|
| 223 |
|
| 224 |
|
|
@@ -265,6 +266,18 @@ APP_CSS = """
|
|
| 265 |
.fullscreen-link:hover {
|
| 266 |
border-color: var(--primary-500);
|
| 267 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 268 |
"""
|
| 269 |
|
| 270 |
with gr.Blocks(title="ModelSentry", delete_cache=(600, 1800)) as demo:
|
|
@@ -337,6 +350,10 @@ with gr.Blocks(title="ModelSentry", delete_cache=(600, 1800)) as demo:
|
|
| 337 |
with gr.Tab("JSON / SBOM"):
|
| 338 |
report = gr.Code(language="json", label="modelsentry.scan.v4 JSON")
|
| 339 |
sbom = gr.File(label="CycloneDX 1.6 SBOM", interactive=False)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 340 |
gr.Markdown(
|
| 341 |
"ModelSentry performs bounded static analysis of untrusted public content. Findings require human review; "
|
| 342 |
"absence of a finding is not proof of safety. Repository contents are not intentionally retained by this app; "
|
|
@@ -358,6 +375,7 @@ with gr.Blocks(title="ModelSentry", delete_cache=(600, 1800)) as demo:
|
|
| 358 |
report,
|
| 359 |
sbom,
|
| 360 |
view_state,
|
|
|
|
| 361 |
]
|
| 362 |
scan.click(run_scan, inputs=target, outputs=outputs)
|
| 363 |
target.submit(run_scan, inputs=target, outputs=outputs)
|
|
|
|
| 219 |
result_json(result),
|
| 220 |
_write_sbom(result),
|
| 221 |
view_state,
|
| 222 |
+
gr.HTML(visible=False),
|
| 223 |
)
|
| 224 |
|
| 225 |
|
|
|
|
| 266 |
.fullscreen-link:hover {
|
| 267 |
border-color: var(--primary-500);
|
| 268 |
}
|
| 269 |
+
.height-reserve {
|
| 270 |
+
min-height: 52rem;
|
| 271 |
+
display: flex;
|
| 272 |
+
flex-direction: column;
|
| 273 |
+
align-items: center;
|
| 274 |
+
justify-content: center;
|
| 275 |
+
text-align: center;
|
| 276 |
+
color: var(--body-text-color-subdued);
|
| 277 |
+
border: 1px dashed var(--border-color-primary);
|
| 278 |
+
border-radius: var(--radius-lg);
|
| 279 |
+
background: var(--background-fill-secondary);
|
| 280 |
+
}
|
| 281 |
"""
|
| 282 |
|
| 283 |
with gr.Blocks(title="ModelSentry", delete_cache=(600, 1800)) as demo:
|
|
|
|
| 350 |
with gr.Tab("JSON / SBOM"):
|
| 351 |
report = gr.Code(language="json", label="modelsentry.scan.v4 JSON")
|
| 352 |
sbom = gr.File(label="CycloneDX 1.6 SBOM", interactive=False)
|
| 353 |
+
height_reserve = gr.HTML(
|
| 354 |
+
'<div class="height-reserve"><h3>Results workspace ready</h3>'
|
| 355 |
+
'<p>Run a scan above. The focused inspectors will replace this placeholder without creating a second scrollbar.</p></div>'
|
| 356 |
+
)
|
| 357 |
gr.Markdown(
|
| 358 |
"ModelSentry performs bounded static analysis of untrusted public content. Findings require human review; "
|
| 359 |
"absence of a finding is not proof of safety. Repository contents are not intentionally retained by this app; "
|
|
|
|
| 375 |
report,
|
| 376 |
sbom,
|
| 377 |
view_state,
|
| 378 |
+
height_reserve,
|
| 379 |
]
|
| 380 |
scan.click(run_scan, inputs=target, outputs=outputs)
|
| 381 |
target.submit(run_scan, inputs=target, outputs=outputs)
|