Spaces:
Runtime error
Runtime error
File size: 516 Bytes
9a44ea0 239e541 9b8fbf4 9a44ea0 2b7e472 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. Write or paste text and the machine will attempt to identify strong words.')
with st.spinner("The model is loading."):
nlp = spacy.load('en_pipeline')
input = st.text_area(label = '')
text = nlp(input)
output_html = spacy.displacy.render(text, style='ent', jupyter=False, options = {"colors": {'bias': 'ff5a36'}})
st.markdown(output_html, unsafe_allow_html=True) |