willwim commited on
Commit
1a9ab3d
Β·
verified Β·
1 Parent(s): 86232e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
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