AbdulIAIML commited on
Commit
15439e8
·
verified ·
1 Parent(s): fca4f2a

Upload 3 files

Browse files
Files changed (1) hide show
  1. app.py +32 -0
app.py ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python
2
+ # coding: utf-8
3
+
4
+ # In[14]:
5
+
6
+
7
+ import gradio as gr
8
+ from joblib import load
9
+
10
+ model = load("model.joblib")
11
+ conv = load("tfd.joblib")
12
+
13
+ def prediction(email):
14
+ inp =[email]
15
+ inp_final = conv.tranform(inp)
16
+ res = model.predict(inp_final)[0]
17
+ return "not-spam" if res==1 else "spam"
18
+ iface = gr.Interface(
19
+ fn = prediction,
20
+ inputs=[gr.Text(label="Email")],
21
+ outputs = "text",
22
+ title = "Spam Identifier",
23
+ description = "this is used an app which can identify the email"
24
+ )
25
+ iface.launch()
26
+
27
+
28
+ # In[ ]:
29
+
30
+
31
+
32
+