carisackc commited on
Commit
fd81714
β€’
1 Parent(s): 27ec91d

Update pages/2_πŸ“†_Daily Narrative.py

Browse files
Files changed (1) hide show
  1. pages/2_πŸ“†_Daily Narrative.py +10 -10
pages/2_πŸ“†_Daily Narrative.py CHANGED
@@ -160,15 +160,15 @@ def run_model(input_text):
160
  col1, col2 = st.columns([1,1])
161
 
162
  with col1:
163
- st.button('Summarize')
164
- run_model(runtext)
165
- sentences=runtext.split('.')
166
- st.text_area('Reference text', str(reference_text))#,label_visibility="hidden")
167
  with col2:
168
- st.button('NER')
169
- doc = nlp(str(original_text2))
170
- colors = { "DISEASE": "pink","CHEMICAL": "orange"}
171
- options = {"ents": [ "DISEASE", "CHEMICAL"],"colors": colors}
172
- ent_html = displacy.render(doc, style="ent", options=options)
173
- st.markdown(ent_html, unsafe_allow_html=True)
174
 
 
160
  col1, col2 = st.columns([1,1])
161
 
162
  with col1:
163
+ if st.button('Summarize')
164
+ run_model(runtext)
165
+ sentences=runtext.split('.')
166
+ st.text_area('Reference text', str(reference_text))#,label_visibility="hidden")
167
  with col2:
168
+ if st.button('NER')
169
+ doc = nlp(str(original_text2))
170
+ colors = { "DISEASE": "pink","CHEMICAL": "orange"}
171
+ options = {"ents": [ "DISEASE", "CHEMICAL"],"colors": colors}
172
+ ent_html = displacy.render(doc, style="ent", options=options)
173
+ st.markdown(ent_html, unsafe_allow_html=True)
174