Wootang01's picture
Update app.py
a8c9818
raw
history blame
528 Bytes
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": {'bias': 'FF5733'}})
st.markdown(output_html, unsafe_allow_html=True)