carisackc commited on
Commit
912322b
1 Parent(s): 11449cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -27,7 +27,7 @@ st.sidebar.markdown('Using transformer model')
27
 
28
  ## Loading in dataset
29
  #df = pd.read_csv('mtsamples_small.csv',index_col=0)
30
- df = pd.read_csv("shpi_w_rouge21Nov.csv")
31
  #df.shape
32
  df['HADM_ID'] = df['HADM_ID'].astype(str).apply(lambda x: x.replace('.0',''))
33
 
@@ -50,7 +50,7 @@ st.sidebar.header("Search for Patient:")
50
  patientid = df['Patient_ID']
51
  patient = st.sidebar.selectbox('Select Patient ID:', patientid)
52
  admissionid = df['Admission_ID'].loc[df['Patient_ID'] == patient]
53
- HospitalAdmission = st.sidebar.selectbox('', admissionid)
54
 
55
  #Another way to for filter selection
56
  #patient = st.sidebar.multiselect(
@@ -113,6 +113,7 @@ runtext =st.text_area('Input Clinical Note here:', str(original_text2), height=3
113
  reference_text = original_text['Reference_text'].values
114
 
115
 
 
116
  #===== Pysummarization =====
117
  from pysummarization.nlpbase.auto_abstractor import AutoAbstractor
118
  from pysummarization.tokenizabledoc.simple_tokenizer import SimpleTokenizer
@@ -324,4 +325,6 @@ def run_model(input_text):
324
  if st.button('Submit'):
325
  run_model(runtext)
326
 
 
327
  st.text_area('Reference text', str(reference_text))
 
 
27
 
28
  ## Loading in dataset
29
  #df = pd.read_csv('mtsamples_small.csv',index_col=0)
30
+ df = pd.read_csv("demo_shpi_w_rouge25Nov.csv")
31
  #df.shape
32
  df['HADM_ID'] = df['HADM_ID'].astype(str).apply(lambda x: x.replace('.0',''))
33
 
 
50
  patientid = df['Patient_ID']
51
  patient = st.sidebar.selectbox('Select Patient ID:', patientid)
52
  admissionid = df['Admission_ID'].loc[df['Patient_ID'] == patient]
53
+ HospitalAdmission = st.sidebar.selectbox(' ', admissionid)
54
 
55
  #Another way to for filter selection
56
  #patient = st.sidebar.multiselect(
 
113
  reference_text = original_text['Reference_text'].values
114
 
115
 
116
+
117
  #===== Pysummarization =====
118
  from pysummarization.nlpbase.auto_abstractor import AutoAbstractor
119
  from pysummarization.tokenizabledoc.simple_tokenizer import SimpleTokenizer
 
325
  if st.button('Submit'):
326
  run_model(runtext)
327
 
328
+
329
  st.text_area('Reference text', str(reference_text))
330
+