ksvmuralidhar commited on
Commit
23239b5
1 Parent(s): 9a7b713

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -223,6 +223,7 @@ def summ_inference(txt: str):
223
  def main():
224
  st.title("News Summarizer & NER")
225
  article_txt = st.text_area("Paste few sentences of a news article:", "", height=200)
 
226
  if st.button("Submit"):
227
  ner_result = [[ent, label.upper(), np.round(prob, 3)]
228
  for ent, label, prob in ner_inference_long_text(article_txt)]
 
223
  def main():
224
  st.title("News Summarizer & NER")
225
  article_txt = st.text_area("Paste few sentences of a news article:", "", height=200)
226
+ article_txt = re.sub(r'\n+',' ', article_txt)
227
  if st.button("Submit"):
228
  ner_result = [[ent, label.upper(), np.round(prob, 3)]
229
  for ent, label, prob in ner_inference_long_text(article_txt)]