rmdhirr commited on
Commit
981e927
1 Parent(s): 09d6b6a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -44,7 +44,7 @@ def preprocess_html(html):
44
  return ' '.join(tokens)
45
 
46
  # Load trained model
47
- model = keras.models.load_model('new_phishing_detection_model.keras')
48
 
49
  # Define maximum length and number of words
50
  max_url_length = 180
@@ -81,12 +81,12 @@ def predict_phishing(url, html):
81
  interface = gr.Interface(
82
  fn=predict_phishing,
83
  inputs=[
84
- gr.inputs.Textbox(label="URL"),
85
- gr.inputs.Textbox(label="HTML Snippet")
86
  ],
87
  outputs=[
88
- gr.outputs.Textbox(label="Predicted Category"),
89
- gr.outputs.Textbox(label="Predicted Probability")
90
  ],
91
  title="Phishing Detection Model",
92
  description="Enter a URL and its HTML content to predict if it's spam or legitimate."
 
44
  return ' '.join(tokens)
45
 
46
  # Load trained model
47
+ model = keras.models.load_model('/content/drive/MyDrive/fix_phishing_detection_model.keras')
48
 
49
  # Define maximum length and number of words
50
  max_url_length = 180
 
81
  interface = gr.Interface(
82
  fn=predict_phishing,
83
  inputs=[
84
+ gr.components.Textbox(label="URL"),
85
+ gr.components.Textbox(label="HTML Snippet")
86
  ],
87
  outputs=[
88
+ gr.components.Textbox(label="Predicted Category"),
89
+ gr.components.Textbox(label="Predicted Probability")
90
  ],
91
  title="Phishing Detection Model",
92
  description="Enter a URL and its HTML content to predict if it's spam or legitimate."