rmdhirr commited on
Commit
37ab448
·
verified ·
1 Parent(s): 2e97462

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -84,10 +84,11 @@ def get_prediction(input_text):
84
  url_data = preprocess_input(cleaned_url, url_tokenizer, max_url_length)
85
  html_data = preprocess_input(cleaned_html, html_tokenizer, max_html_length)
86
 
87
- # Combine URL and HTML data by concatenation
88
- combined_data = np.concatenate((url_data, html_data), axis=1)
 
89
 
90
- prediction = model.predict(combined_data)[0][0]
91
  return prediction
92
 
93
  def phishing_detection(input_text):
 
84
  url_data = preprocess_input(cleaned_url, url_tokenizer, max_url_length)
85
  html_data = preprocess_input(cleaned_html, html_tokenizer, max_html_length)
86
 
87
+ # Ensure the input shapes are correct
88
+ url_data = np.expand_dims(url_data, axis=0) # Add batch dimension
89
+ html_data = np.expand_dims(html_data, axis=0) # Add batch dimension
90
 
91
+ prediction = model.predict([url_data, html_data])[0][0]
92
  return prediction
93
 
94
  def phishing_detection(input_text):