File size: 529 Bytes
9a44ea0
 
 
 
58843af
9a44ea0
239e541
9b8fbf4
9a44ea0
58843af
9a44ea0
 
63fd2f8
9a44ea0
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import spacy
import streamlit as st

st.title('Strong Word Highlighter')
st.write('Strong words evoke emotions, may offend and may indicate bias.')

with st.spinner("The model is loading."):
  nlp = spacy.load('en_pipeline')
  
input = st.text_area(label = 'Write or paste text below. Enter and the machine will attempt to identify strong words.')
text = nlp(input)

output_html = spacy.displacy.render(text, style='ent', jupyter=False, options = {"colors": {'strong':'ff5a36'}})

st.markdown(output_html, unsafe_allow_html=True)