bryanmildort commited on
Commit
a470a40
·
1 Parent(s): 3a22917

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -8
app.py CHANGED
@@ -11,6 +11,13 @@ def summarize_function(notes):
11
  st.write('Summary: ')
12
  return gen_text
13
 
 
 
 
 
 
 
 
14
  st.markdown("<h1 style='text-align: center; color: #489DDB;'>GPT Clinical Notes Summarizer</h1>", unsafe_allow_html=True)
15
  st.markdown("<h6 style='text-align: center; color: #489DDB;'>by Bryan Mildort</h1>", unsafe_allow_html=True)
16
 
@@ -38,14 +45,6 @@ def load_model():
38
 
39
  pipe = load_model()
40
 
41
- notes_df = pd.read_csv('notes_small.csv')
42
- examples_tuple = ()
43
- for i in range(len(notes_df)):
44
- examples_tuple += (f"Patient {i+1}", )
45
-
46
- example = st.sidebar.selectbox('Example', (examples_tuple), index=0)
47
- st.write(example)
48
-
49
  prompt = notes_df.iloc[int(example[-1:])-1].PARSED
50
  input_text = st.text_area("Notes:", prompt)
51
  if st.button('Summarize'):
 
11
  st.write('Summary: ')
12
  return gen_text
13
 
14
+ notes_df = pd.read_csv('notes_small.csv')
15
+ examples_tuple = ()
16
+ for i in range(len(notes_df)):
17
+ examples_tuple += (f"Patient {i+1}", )
18
+
19
+ example = st.sidebar.selectbox('Example', (examples_tuple), index=0)
20
+
21
  st.markdown("<h1 style='text-align: center; color: #489DDB;'>GPT Clinical Notes Summarizer</h1>", unsafe_allow_html=True)
22
  st.markdown("<h6 style='text-align: center; color: #489DDB;'>by Bryan Mildort</h1>", unsafe_allow_html=True)
23
 
 
45
 
46
  pipe = load_model()
47
 
 
 
 
 
 
 
 
 
48
  prompt = notes_df.iloc[int(example[-1:])-1].PARSED
49
  input_text = st.text_area("Notes:", prompt)
50
  if st.button('Summarize'):