rajendradayma commited on
Commit
e7a2add
Β·
verified Β·
1 Parent(s): d5c4c0d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import streamlit as st
2
  from models import load_model
3
  from utils import mask_pii
@@ -6,7 +7,7 @@ st.set_page_config(page_title="πŸ“§ Email Classification System", page_icon="
6
 
7
  st.title("πŸ“§ Email Classification and PII Masking System")
8
 
9
- # Load the model
10
  model = load_model("model/classifier.pkl")
11
 
12
  # Prediction function
@@ -20,7 +21,7 @@ def classify_email_direct(email_body):
20
  "category_of_the_email": category
21
  }
22
 
23
- # UI
24
  email_input = st.text_area("βœ‰οΈ Enter your email text:")
25
 
26
  if st.button("πŸš€ Classify Email"):
@@ -36,4 +37,4 @@ if st.button("πŸš€ Classify Email"):
36
  st.subheader("πŸ“‚ Predicted Category")
37
  st.success(result['category_of_the_email'])
38
  else:
39
- st.warning("⚠️ Please enter some email text to classify.")
 
1
+ # streamlit_app.py
2
  import streamlit as st
3
  from models import load_model
4
  from utils import mask_pii
 
7
 
8
  st.title("πŸ“§ Email Classification and PII Masking System")
9
 
10
+ # Load model
11
  model = load_model("model/classifier.pkl")
12
 
13
  # Prediction function
 
21
  "category_of_the_email": category
22
  }
23
 
24
+ # Streamlit UI
25
  email_input = st.text_area("βœ‰οΈ Enter your email text:")
26
 
27
  if st.button("πŸš€ Classify Email"):
 
37
  st.subheader("πŸ“‚ Predicted Category")
38
  st.success(result['category_of_the_email'])
39
  else:
40
+ st.warning("⚠️ Please enter some text first.")