alzx1's picture
Upload 7 files
24c0046 verified
raw
history blame contribute delete
614 Bytes
import gradio as gr
from joblib import load
model = load("model.joblib")
conv = load("tfd.joblib")
def prediction(email):
inp = [email] # passing input
inp_final = conv.transform(inp) # converting input
res = model.predict(inp_final)[0] # predicting output
return "Not Spam" if res==1 else "Spam" # predicting result
iface = gr.Interface(
fn = prediction,
inputs=[gr.Text(label="Email")],
outputs= "text",
title="Spam Idetifier",
description="This is used an app which can identify the email")
iface.launch()