Surendradjh commited on
Commit
2c6a92a
·
verified ·
1 Parent(s): 20803fb

Update spam_streamlit.py

Browse files
Files changed (1) hide show
  1. spam_streamlit.py +19 -19
spam_streamlit.py CHANGED
@@ -1,20 +1,20 @@
1
- import streamlit as st
2
- import pickle
3
- import pandas as pd
4
-
5
- st.title('E-Mail Spam Detection')
6
- with open(r"spam_detection.pkl",'rb') as file:
7
- model=pickle.load(file)
8
-
9
- with open(r"Text_converter.pkl","rb") as file:
10
- tr=pickle.load(file)
11
-
12
- E_mail=st.text_input("Enter E-Mail Title")
13
- if st.button('Predict'):
14
- a=tr.transform([E_mail])
15
- # st.write(a)
16
- a=model.predict(a)
17
- if a == 'ham':
18
- st.write("It's not Spam message")
19
- else:
20
  st.write("It's a spam Message please avoid this Message ")
 
1
+ import streamlit as st
2
+ import pickle
3
+ # import pandas as pd
4
+
5
+ st.title('E-Mail Spam Detection')
6
+ with open(r"spam_detection.pkl",'rb') as file:
7
+ model=pickle.load(file)
8
+
9
+ with open(r"Text_converter.pkl","rb") as file:
10
+ tr=pickle.load(file)
11
+
12
+ E_mail=st.text_input("Enter E-Mail Title")
13
+ if st.button('Predict'):
14
+ a=tr.transform([E_mail])
15
+ # st.write(a)
16
+ a=model.predict(a)
17
+ if a == 'ham':
18
+ st.write("It's not Spam message")
19
+ else:
20
  st.write("It's a spam Message please avoid this Message ")