Spaces:
Runtime error
Runtime error
Commit
·
7ce14de
1
Parent(s):
710c693
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,7 +3,7 @@ import re
|
|
| 3 |
import sys
|
| 4 |
import json
|
| 5 |
import tempfile
|
| 6 |
-
|
| 7 |
|
| 8 |
from transformers import (
|
| 9 |
TrainingArguments,
|
|
@@ -245,12 +245,13 @@ model_radio_input = gr.inputs.Radio(model_choices, type="value", default='OBI-Ro
|
|
| 245 |
title = 'DE-IDENTIFICATION OF ELECTRONIC HEALTH RECORDS'
|
| 246 |
description = 'Models to remove private information (PHI/PII) from raw medical notes. The recall threshold (bias) can be used to remove PHI more aggressively.'
|
| 247 |
|
| 248 |
-
gradio_input =
|
| 249 |
lines=10,
|
| 250 |
placeholder='Enter text with PHI',
|
| 251 |
label='RAW MEDICAL NOTE'
|
| 252 |
)
|
| 253 |
|
|
|
|
| 254 |
gradio_highlight_output = gr.outputs.HighlightedText(
|
| 255 |
label='LABELED DE-IDENTIFIED MEDICAL NOTE',
|
| 256 |
)
|
|
|
|
| 3 |
import sys
|
| 4 |
import json
|
| 5 |
import tempfile
|
| 6 |
+
from gradio.components import Radio, Textbox, HighlightedText, Textbox
|
| 7 |
|
| 8 |
from transformers import (
|
| 9 |
TrainingArguments,
|
|
|
|
| 245 |
title = 'DE-IDENTIFICATION OF ELECTRONIC HEALTH RECORDS'
|
| 246 |
description = 'Models to remove private information (PHI/PII) from raw medical notes. The recall threshold (bias) can be used to remove PHI more aggressively.'
|
| 247 |
|
| 248 |
+
gradio_input = Textbox(
|
| 249 |
lines=10,
|
| 250 |
placeholder='Enter text with PHI',
|
| 251 |
label='RAW MEDICAL NOTE'
|
| 252 |
)
|
| 253 |
|
| 254 |
+
|
| 255 |
gradio_highlight_output = gr.outputs.HighlightedText(
|
| 256 |
label='LABELED DE-IDENTIFIED MEDICAL NOTE',
|
| 257 |
)
|