Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -396,8 +396,8 @@ with gr.Blocks(title="ADR Detector", css=custom_css, theme=gr.themes.Soft()) as
|
|
| 396 |
"and key medical entities."
|
| 397 |
)
|
| 398 |
|
|
|
|
| 399 |
with gr.Row():
|
| 400 |
-
# ββ Left column: input ββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 401 |
with gr.Column(scale=1):
|
| 402 |
gr.Markdown("### Input")
|
| 403 |
prob1 = gr.Textbox(
|
|
@@ -423,7 +423,6 @@ with gr.Blocks(title="ADR Detector", css=custom_css, theme=gr.themes.Soft()) as
|
|
| 423 |
inputs=[prob1],
|
| 424 |
)
|
| 425 |
|
| 426 |
-
# ββ Right column: outputs βββββββββββββββββββββββββββββββββββββββββββββ
|
| 427 |
with gr.Column(scale=1):
|
| 428 |
gr.Markdown("### Classification")
|
| 429 |
label = gr.Label(label="Severity Probability")
|
|
@@ -431,9 +430,13 @@ with gr.Blocks(title="ADR Detector", css=custom_css, theme=gr.themes.Soft()) as
|
|
| 431 |
gr.Markdown("### Severity Rating")
|
| 432 |
severity_out = gr.HTML(label="Severity Rating", elem_classes="output-box")
|
| 433 |
|
|
|
|
|
|
|
|
|
|
| 434 |
gr.Markdown("### Medical Entities")
|
| 435 |
htext_out = gr.HTML(label="NER Mapping", elem_classes="output-box")
|
| 436 |
|
|
|
|
| 437 |
gr.Markdown("### Model Logic (SHAP)")
|
| 438 |
shap_out = gr.HTML(label="Feature Importance", elem_classes="output-box")
|
| 439 |
|
|
|
|
| 396 |
"and key medical entities."
|
| 397 |
)
|
| 398 |
|
| 399 |
+
# ββ Row 1: Input + Classification/Severity ββββββββββββββββββββββββββββββββ
|
| 400 |
with gr.Row():
|
|
|
|
| 401 |
with gr.Column(scale=1):
|
| 402 |
gr.Markdown("### Input")
|
| 403 |
prob1 = gr.Textbox(
|
|
|
|
| 423 |
inputs=[prob1],
|
| 424 |
)
|
| 425 |
|
|
|
|
| 426 |
with gr.Column(scale=1):
|
| 427 |
gr.Markdown("### Classification")
|
| 428 |
label = gr.Label(label="Severity Probability")
|
|
|
|
| 430 |
gr.Markdown("### Severity Rating")
|
| 431 |
severity_out = gr.HTML(label="Severity Rating", elem_classes="output-box")
|
| 432 |
|
| 433 |
+
# ββ Row 2: Medical Entities (left) | SHAP chart (right) ββββββββββββββββββ
|
| 434 |
+
with gr.Row():
|
| 435 |
+
with gr.Column(scale=1):
|
| 436 |
gr.Markdown("### Medical Entities")
|
| 437 |
htext_out = gr.HTML(label="NER Mapping", elem_classes="output-box")
|
| 438 |
|
| 439 |
+
with gr.Column(scale=1):
|
| 440 |
gr.Markdown("### Model Logic (SHAP)")
|
| 441 |
shap_out = gr.HTML(label="Feature Importance", elem_classes="output-box")
|
| 442 |
|