bryanmildort commited on
Commit
3a22917
1 Parent(s): 17ca582

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -14,6 +14,13 @@ def summarize_function(notes):
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
 
 
 
 
 
 
 
 
17
  from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
18
  # from accelerate import infer_auto_device_map
19
  # device = "cuda:0" if torch.cuda.is_available() else "cpu"
@@ -46,10 +53,3 @@ if st.button('Summarize'):
46
  parsed_input = re.sub(r'\n+', '\n',parsed_input)
47
  final_input = f"""[Notes]:\n{parsed_input}\n[Summary]:\n"""
48
  st.write(summarize_function(final_input))
49
-
50
- st.sidebar.markdown("<h1 style='text-align: center; color: #489DDB;'>GPT Clinical Notes Summarizer 0.1v</h1>", unsafe_allow_html=True)
51
- st.sidebar.markdown("<h6 style='text-align: center; color: #489DDB;'>The model for this application was created with generous support of the Google TPU Research Cloud (TPU). This demo is for investigative research purposes only. The model is assumed to have several limiations and biases, so please oversee responses with human moderation. It is not intended for production ready enterprises and is displayed to illustrate the capabilities of Large Language Models for healthcare research.</h1>", unsafe_allow_html=True)
52
- tower = Image.open('howard_social.png')
53
- seal = Image.open('Howard_University_seal.svg.png')
54
- st.sidebar.image(tower)
55
- st.sidebar.image(seal)
 
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
 
17
+ st.sidebar.markdown("<h1 style='text-align: center; color: #489DDB;'>GPT Clinical Notes Summarizer 0.1v</h1>", unsafe_allow_html=True)
18
+ st.sidebar.markdown("<h6 style='text-align: center; color: #489DDB;'>The model for this application was created with generous support of the Google TPU Research Cloud (TPU). This demo is for investigative research purposes only. The model is assumed to have several limiations and biases, so please oversee responses with human moderation. It is not intended for production ready enterprises and is displayed to illustrate the capabilities of Large Language Models for healthcare research.</h1>", unsafe_allow_html=True)
19
+ tower = Image.open('howard_social.png')
20
+ seal = Image.open('Howard_University_seal.svg.png')
21
+ st.sidebar.image(tower)
22
+ st.sidebar.image(seal)
23
+
24
  from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
25
  # from accelerate import infer_auto_device_map
26
  # device = "cuda:0" if torch.cuda.is_available() else "cpu"
 
53
  parsed_input = re.sub(r'\n+', '\n',parsed_input)
54
  final_input = f"""[Notes]:\n{parsed_input}\n[Summary]:\n"""
55
  st.write(summarize_function(final_input))