AhmedTaha012 commited on
Commit
68aa027
·
1 Parent(s): ab9129c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -247,7 +247,7 @@ def getSentence(listOfSentences,value):
247
  return value
248
  def get_annotated_text(text,value,entity):
249
  doc = nlp(text)
250
- doc.ents = [doc.char_span(txt.index(value), txt.index(value)+len(value), label=entity)]
251
  ent_html = displacy.render(doc, style='ent', jupyter=False)# Display the entity visualization in the browser:
252
  st.markdown(ent_html, unsafe_allow_html=True)
253
  return [text.split(value)[0],(value,entity),text.split(value)[1]]
 
247
  return value
248
  def get_annotated_text(text,value,entity):
249
  doc = nlp(text)
250
+ doc.ents = [doc.char_span(text.index(value), text.index(value)+len(value), label=entity)]
251
  ent_html = displacy.render(doc, style='ent', jupyter=False)# Display the entity visualization in the browser:
252
  st.markdown(ent_html, unsafe_allow_html=True)
253
  return [text.split(value)[0],(value,entity),text.split(value)[1]]