prajwal967
commited on
Commit
•
6c5c398
1
Parent(s):
584d7ba
update examples
Browse files
app.py
CHANGED
@@ -52,7 +52,7 @@ class App(object):
|
|
52 |
))
|
53 |
model_config = App._get_model_config()
|
54 |
model_config['model_name_or_path'] = App._get_model_map()[model]
|
55 |
-
if threshold == 'No
|
56 |
model_config['post_process'] = 'argmax'
|
57 |
model_config['threshold'] = None
|
58 |
else:
|
@@ -236,8 +236,8 @@ def deid(text, model, threshold):
|
|
236 |
deid_text_remove = list(app.get_deid_text_removed(tmp.name, tmp_1.name))[0]['deid_text']
|
237 |
return [highlight_text for highlight_text in App._get_highlights(deid_text)], deid_text_remove
|
238 |
|
239 |
-
recall_choices = ["No
|
240 |
-
recall_radio_input = gr.inputs.Radio(recall_choices, type="value", default=None, label='RECALL
|
241 |
|
242 |
model_choices = list(App._get_model_map().keys())
|
243 |
model_radio_input = gr.inputs.Radio(model_choices, type="value", default=None, label='DE-ID MODEL')
|
@@ -259,8 +259,8 @@ gradio_text_output = gr.outputs.Textbox(
|
|
259 |
label='DE-IDENTIFIED MEDICAL NOTE'
|
260 |
)
|
261 |
|
262 |
-
examples = [["Physician Discharge Summary Admit date: 10/12/1982 Discharge date: 10/22/1982 Patient Information Jack Reacher, 54 y.o. male (DOB = 1/21/1928). Home Address: 123 Park Drive, San Diego, CA, 03245. Home Phone: 202-555-0199 (home). Hospital Care Team Service: Orthopedics Inpatient Attending: Roger C Kelly, MD Attending phys phone: (634)743-5135 Discharge Unit: HCS843 Primary Care Physician: Hassan V Kim, MD 512-832-5025.", "OBI-RoBERTa De-
|
263 |
-
"OBI-ClinicalBERT De-
|
264 |
|
265 |
iface = gr.Interface(
|
266 |
title=title,
|
|
|
52 |
))
|
53 |
model_config = App._get_model_config()
|
54 |
model_config['model_name_or_path'] = App._get_model_map()[model]
|
55 |
+
if threshold == 'No threshold':
|
56 |
model_config['post_process'] = 'argmax'
|
57 |
model_config['threshold'] = None
|
58 |
else:
|
|
|
236 |
deid_text_remove = list(app.get_deid_text_removed(tmp.name, tmp_1.name))[0]['deid_text']
|
237 |
return [highlight_text for highlight_text in App._get_highlights(deid_text)], deid_text_remove
|
238 |
|
239 |
+
recall_choices = ["No threshold", "99.5"]
|
240 |
+
recall_radio_input = gr.inputs.Radio(recall_choices, type="value", default=None, label='RECALL THRESHOLD')
|
241 |
|
242 |
model_choices = list(App._get_model_map().keys())
|
243 |
model_radio_input = gr.inputs.Radio(model_choices, type="value", default=None, label='DE-ID MODEL')
|
|
|
259 |
label='DE-IDENTIFIED MEDICAL NOTE'
|
260 |
)
|
261 |
|
262 |
+
examples = [["Physician Discharge Summary Admit date: 10/12/1982 Discharge date: 10/22/1982 Patient Information Jack Reacher, 54 y.o. male (DOB = 1/21/1928). Home Address: 123 Park Drive, San Diego, CA, 03245. Home Phone: 202-555-0199 (home). Hospital Care Team Service: Orthopedics Inpatient Attending: Roger C Kelly, MD Attending phys phone: (634)743-5135 Discharge Unit: HCS843 Primary Care Physician: Hassan V Kim, MD 512-832-5025.", "OBI-RoBERTa De-ID", "No threshold"], ["Consult NotePt: Ulysses Ogrady MC #0937884Date: 07/01/19 Williams Ct M OSCAR, JOHNNY Hyderabad, WI 62297\n\nHISTORY OF PRESENT ILLNESS: The patient is a 77-year-old-woman with long standing hypertension who presented as a Walk-in to me at the Brigham Health Center on Friday. Recently had been started q.o.d. on Clonidine since 01/15/19 to taper off of the drug. Was told to start Zestril 20 mg. q.d. again. The patient was sent to the Unit for direct admission for cardioversion and anticoagulation, with the Cardiologist, Dr. Wilson to follow.\nSOCIAL HISTORY: Lives alone, has one daughter living in Nantucket. Is a non-smoker, and does not drink alcohol.\nHOSPITAL COURSE AND TREATMENT: During admission, the patient was seen by Cardiology, Dr. Wilson, was started on IV Heparin, Sotalol 40 mg PO b.i.d. increased to 80 mg b.i.d., and had an echocardiogram. By 07-22-19 the patient had better rate control and blood pressure control but remained in atrial fibrillation. On 08.03.19, the patient was felt to be medically stable.", "OBI-RoBERTa De-ID", "99.5"], ["Consult NotePt: Ulysses Ogrady MC #0937884Date: 07/01/19 Williams Ct M OSCAR, JOHNNY Hyderabad, WI 62297\n\nHISTORY OF PRESENT ILLNESS: The patient is a 77-year-old-woman with long standing hypertension who presented as a Walk-in to me at the Brigham Health Center on Friday. Recently had been started q.o.d. on Clonidine since 01/15/19 to taper off of the drug. Was told to start Zestril 20 mg. q.d. again. The patient was sent to the Unit for direct admission for cardioversion and anticoagulation, with the Cardiologist, Dr. Wilson to follow.\nSOCIAL HISTORY: Lives alone, has one daughter living in Nantucket. Is a non-smoker, and does not drink alcohol.\nHOSPITAL COURSE AND TREATMENT: During admission, the patient was seen by Cardiology, Dr. Wilson, was started on IV Heparin, Sotalol 40 mg PO b.i.d. increased to 80 mg b.i.d., and had an echocardiogram. By 07-22-19 the patient had better rate control and blood pressure control but remained in atrial fibrillation. On 08.03.19, the patient was felt to be medically stable.", "OBI-ClinicalBERT De-ID", "99.5"], ['HPI: Pt is a 59 yo Khazakhstani male, with who was admitted to San Rafael Mount Hospital following a syncopal nauseas and was brought to Rafael Mount ED. Five weeks ago prior Anemia: On admission to Rafael Hospital, Hb/Hct: 11.6/35.5. Tobacco: Quit at 38 y/o; ETOH: 1-2 beers/week; Caffeine:\nDD:05/05/2022 DT:05/05/2022 WK:65255 :4653\nNO GROWTH TO DATE Specimen: 38:Z8912708G Collected\n\n2nd set biomarkers (WPH): Creatine Kinase Isoenzymes Hospitalized 2115 TCH for ROMI 2120 TCH new onset\n\nLab Tests Amador: the lab results show good levels of 10MG PO qd : 04/10/2021 - 05/15/2021 ACT : rosenberg 128\n placed 3/22 for bradycardia. P/G model #5435, serial # 4712198. \n\nSocial history: Married, glazier, 3 grown adult children. Has VNA. Former civil engineer, supervisor, consultant. She is looking forward to a good Christmas. She is here today',
|
263 |
+
"OBI-ClinicalBERT De-ID", 'No threshold']]
|
264 |
|
265 |
iface = gr.Interface(
|
266 |
title=title,
|