Hussain033 commited on
Commit
5737c27
1 Parent(s): 6bc9bc5

Update phishing_url_detection/featureExtractor.py

Browse files
phishing_url_detection/featureExtractor.py CHANGED
@@ -4,7 +4,7 @@ import httpx
4
  import pickle as pk
5
  import pandas as pd
6
  import phishing_url_detection.extractorFunctions as ef
7
-
8
  #Function to extract features
9
  def featureExtraction(url):
10
 
@@ -42,11 +42,9 @@ def featureExtraction(url):
42
 
43
  features.append(ef.has_unicode(url)+ef.haveAtSign(url)+ef.havingIP(url))
44
 
45
- from pathlib import Path
46
-
47
- root_folder = Path(__file__).parents[1]
48
 
49
- my_path = root_folder / "doc/foo.json"
50
 
51
  with open(my_path, 'rb') as file:
52
  pca = pk.load(file)
 
4
  import pickle as pk
5
  import pandas as pd
6
  import phishing_url_detection.extractorFunctions as ef
7
+ from pathlib import Path
8
  #Function to extract features
9
  def featureExtraction(url):
10
 
 
42
 
43
  features.append(ef.has_unicode(url)+ef.haveAtSign(url)+ef.havingIP(url))
44
 
45
+ root_folder = Path(__file__).parents[1]
 
 
46
 
47
+ my_path = root_folder / "models/pca_model.pkl"
48
 
49
  with open(my_path, 'rb') as file:
50
  pca = pk.load(file)