Spaces:
Runtime error
Runtime error
| 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") |