Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| import joblib | |
| load_model,load_vectorizer = joblib.load('spam_detection.pkl') | |
| def classify(text): | |
| temp = [text] | |
| temp_data_F = load_vectorizer.transform(temp) | |
| t = load_model.predict(temp_data_F)[0] | |
| if(t == 0): | |
| return("Not A SPAM") | |
| else: | |
| return("SPAM") | |
| gr.Interface(fn=classify,inputs='text',outputs="text",title = "SPAM EMAIL DETECTOR").launch() |