Spaces:
Runtime error
Runtime error
Create app.py
Browse files
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)
|