Hussain033 commited on
Commit
56ad3d3
1 Parent(s): d2c6ec0

create app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -0
app.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from featureExtractor import featureExtraction
3
+ from pycaret.classification import load_model, predict_model
4
+
5
+ model = load_model('phishingdetection')
6
+
7
+
8
+ def predict(url):
9
+ data = featureExtraction(url)
10
+ result = predict_model(model, data = data)
11
+ return result['prediction_label'][0]
12
+
13
+ app = gr.Interface(fn=predict,
14
+ inputs="text",
15
+ outputs="text",
16
+ )
17
+ if __name__ == "__main__":
18
+ app.launch(debug = True)