Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
|
3 |
+
from helpers.pii import PII_IDENTIFIER
|
4 |
+
|
5 |
+
|
6 |
+
pii_id_instance = PII_IDENTIFIER()
|
7 |
+
|
8 |
+
st.title("Personal data ID")
|
9 |
+
|
10 |
+
text_to_predict = st.text_input('Enter text :: ', '')
|
11 |
+
|
12 |
+
|
13 |
+
if st.button("Predict"):
|
14 |
+
print(text_to_predict)
|
15 |
+
out = pii_id_instance.identify(text_to_predict)
|
16 |
+
st.write(out['anonymized_text'])
|
17 |
+
|
18 |
+
|
19 |
+
### TO RUN :: streamlit run ui_app.py
|