awacke1 commited on
Commit
6af3f8d
Β·
1 Parent(s): b6d7599

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st # web
2
+ import spacy # named entity recognition
3
+ st.title("Bias Mitigator for Fairness and Equity AI for Corpus and Data")
4
+ with st.spinner("Please wait while the model is being loaded...."):
5
+ nlp = spacy.load("en_pipeline")
6
+ input = st.text_area(label = "Enter your text to get biased words recognized.....")
7
+ doc = nlp(input)
8
+ output_html = spacy.displacy.render(doc, style='ent', jupyter=False, options = {"colors": {'bias':'#ff5a36'} })
9
+ st.markdown(output_html, unsafe_allow_html=True)