sameerr007's picture
Update app.py
a35fd30
raw
history blame contribute delete
401 Bytes
import streamlit as st
import pickle
tfidf=pickle.load(open("tfidf.pkl","rb"))
model=pickle.load(open("model.pkl","rb"))
st.title("Spam-NonSpam Detector")
Input=st.text_input("Input","Write here...")
if st.button("Check"):
InputDataFeatures=tfidf.transform([Input])
prediction=model.predict(InputDataFeatures)
if prediction==0:
st.text("Spam")
else:
st.text("Not Spam")