Spaces:
Sleeping
Sleeping
File size: 399 Bytes
cdea21f |
1 2 3 4 5 6 7 8 9 10 11 12 |
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() |