File size: 494 Bytes
56ad3d3
2b66a48
56ad3d3
 
2b66a48
56ad3d3
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import gradio as gr
from phishing_url_detection.featureExtractor import featureExtraction
from pycaret.classification import load_model, predict_model

model = load_model('models/phishingdetection')


def predict(url):
  data = featureExtraction(url)
  result = predict_model(model, data = data)
  return result['prediction_label'][0]

app = gr.Interface(fn=predict,
             inputs="text",
             outputs="text",
            )
if __name__ == "__main__":
    app.launch(debug = True)