skadio commited on
Commit
ad571cb
1 Parent(s): fadd496

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -5,7 +5,7 @@ warnings.filterwarnings("ignore", category=DeprecationWarning)
5
 
6
  import streamlit as st
7
  import ner4opt
8
- from ner4opt.utils import spacy_tokenize_sentence
9
  from spacy import displacy
10
 
11
  HTML_WRAPPER = """<div style="overflow-x: auto; border: 1px solid #e6e9ef; border-radius: 0.25rem; padding: 1rem; margin-bottom: 2.5rem">{}</div>"""
@@ -64,7 +64,7 @@ def main():
64
  })
65
 
66
  ner_for_display = [{
67
- "text": spacy_tokenize_sentence(text),
68
  "ents": entities_formatted,
69
  "title": "Named Entities"
70
  }]
 
5
 
6
  import streamlit as st
7
  import ner4opt
8
+ from ner4opt.utils import preprocess, spacy_tokenize_sentence
9
  from spacy import displacy
10
 
11
  HTML_WRAPPER = """<div style="overflow-x: auto; border: 1px solid #e6e9ef; border-radius: 0.25rem; padding: 1rem; margin-bottom: 2.5rem">{}</div>"""
 
64
  })
65
 
66
  ner_for_display = [{
67
+ "text": spacy_tokenize_sentence(preprocess(text)),
68
  "ents": entities_formatted,
69
  "title": "Named Entities"
70
  }]