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()