Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -76,9 +76,10 @@ def extract_features(url):
|
|
| 76 |
return [SFH, popUpWidnow, SSLfinal_State, Request_URL, URL_of_Anchor, URL_Length, age_of_domain, having_IP_Address]
|
| 77 |
|
| 78 |
|
| 79 |
-
def predict_url(url, model
|
| 80 |
features = extract_features(url)
|
| 81 |
-
|
|
|
|
| 82 |
prediction = model.predict(features_df)
|
| 83 |
if prediction[0] == 1:
|
| 84 |
return "Phishing"
|
|
|
|
| 76 |
return [SFH, popUpWidnow, SSLfinal_State, Request_URL, URL_of_Anchor, URL_Length, age_of_domain, having_IP_Address]
|
| 77 |
|
| 78 |
|
| 79 |
+
def predict_url(url, model):
|
| 80 |
features = extract_features(url)
|
| 81 |
+
X_columns = ['SFH', 'popUpWidnow', 'SSLfinal_State', 'Request_URL', 'URL_of_Anchor', 'URL_Length', 'age_of_domain', 'having_IP_Address']
|
| 82 |
+
features_df = pd.DataFrame([features], columns=X_columns)
|
| 83 |
prediction = model.predict(features_df)
|
| 84 |
if prediction[0] == 1:
|
| 85 |
return "Phishing"
|