bryanmildort commited on
Commit
2d0e2ce
·
1 Parent(s): eed8ed2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -8,7 +8,7 @@ def summarize_function(notes):
8
  input_ids = notes_input.input_ids
9
  gen_tokens = model.generate(input_ids, do_sample=True, temperature = 0.5, max_length=max_length)
10
  gen_text = tokenizer.batch_decode(gen_tokens)[0]
11
- return gen_text.replace(notes, '')
12
 
13
  st.markdown("<h1 style='text-align: center; color: #489DDB;'>GPT Clinical Notes Summarizer</h1>", unsafe_allow_html=True)
14
  st.markdown("<h6 style='text-align: center; color: #489DDB;'>by Bryan Mildort</h1>", unsafe_allow_html=True)
 
8
  input_ids = notes_input.input_ids
9
  gen_tokens = model.generate(input_ids, do_sample=True, temperature = 0.5, max_length=max_length)
10
  gen_text = tokenizer.batch_decode(gen_tokens)[0]
11
+ return gen_text[len(notes):]
12
 
13
  st.markdown("<h1 style='text-align: center; color: #489DDB;'>GPT Clinical Notes Summarizer</h1>", unsafe_allow_html=True)
14
  st.markdown("<h6 style='text-align: center; color: #489DDB;'>by Bryan Mildort</h1>", unsafe_allow_html=True)