Inder-26 commited on
Commit
2d7183c
·
1 Parent(s): add681a

Fix data ingestion path, update README images, and enable reload

Browse files
README.md CHANGED
@@ -10,7 +10,11 @@ license: mit
10
 
11
  # 🛡️ Network Security System: Phishing URL Detection
12
 
13
- ![UI Homepage](images/ui_homepage.png)
 
 
 
 
14
 
15
  ## 📋 Table of Contents
16
 
 
10
 
11
  # 🛡️ Network Security System: Phishing URL Detection
12
 
13
+ ![UI Homepage 1](images/home_page_1.png)
14
+ ![UI Homepage 2](images/home_page_2.png)
15
+ ![UI Homepage 3](images/home_page_3.png)
16
+ ![UI Homepage 4](images/home_page_4.png)
17
+ ![UI Homepage 5](images/home_page_5.png)
18
 
19
  ## 📋 Table of Contents
20
 
app.py CHANGED
@@ -605,5 +605,5 @@ if __name__ == "__main__":
605
  "app:app",
606
  host="0.0.0.0",
607
  port=8000,
608
- reload=False
609
  )
 
605
  "app:app",
606
  host="0.0.0.0",
607
  port=8000,
608
+ reload=True
609
  )
debug.txt DELETED
Binary file (24 Bytes)
 
images/home_page_1.png ADDED

Git LFS Details

  • SHA256: 2179b6464cf9f9fc4284cfb676ac11417d05877396638a1cf77846ca64d6c05d
  • Pointer size: 131 Bytes
  • Size of remote file: 373 kB
images/home_page_2.png ADDED

Git LFS Details

  • SHA256: e129e368532ab24ef3e37e7a4faf14781613d96c6fee6c6dabf1fba97eb9d3fb
  • Pointer size: 130 Bytes
  • Size of remote file: 95.5 kB
images/home_page_3.png ADDED

Git LFS Details

  • SHA256: db208fad3286317ef8095120cbf05df3c49b8041308ad32d44b2eb59b2f91d4e
  • Pointer size: 130 Bytes
  • Size of remote file: 85.4 kB
images/home_page_4.png ADDED

Git LFS Details

  • SHA256: 27377e66a1e05b6e9eec679e9d0a62fd4eeaca7346d1d4ac8052d44c52e8c1dc
  • Pointer size: 130 Bytes
  • Size of remote file: 74 kB
images/home_page_5.png ADDED

Git LFS Details

  • SHA256: 3d76bdc2d5f21e1f4b790a66258c340eb6f202abb59a75195021017eb86a2b4e
  • Pointer size: 131 Bytes
  • Size of remote file: 115 kB
networksecurity/components/data_ingestion.py CHANGED
@@ -46,11 +46,19 @@ class DataIngestion:
46
  import logging
47
  logging.info(f"MongoDB unavailable, using sample CSV: {str(e)}")
48
  try:
49
- df = pd.read_csv("Network_data/phisingData.csv")
 
 
 
 
 
 
 
 
50
  logging.info(f" Loaded {len(df)} rows from CSV")
51
  return df
52
  except FileNotFoundError:
53
- raise NetworkSecurityException("Sample CSV not found at Network_data/phisingData.csv", sys)
54
 
55
 
56
  def export_data_into_feature_store(self, dataframe: pd.DataFrame):
 
46
  import logging
47
  logging.info(f"MongoDB unavailable, using sample CSV: {str(e)}")
48
  try:
49
+ # Construct absolute path relative to this script file
50
+ # Script is in networksecurity/components/data_ingestion.py
51
+ # Root is 2 levels up from current_dir (components)
52
+ current_dir = os.path.dirname(os.path.abspath(__file__))
53
+ root_dir = os.path.dirname(os.path.dirname(current_dir))
54
+ csv_path = os.path.join(root_dir, "Network_data", "phisingData.csv")
55
+
56
+ logging.info(f"MongoDB unavailable. Attempting to load CSV from: {csv_path}")
57
+ df = pd.read_csv(csv_path)
58
  logging.info(f" Loaded {len(df)} rows from CSV")
59
  return df
60
  except FileNotFoundError:
61
+ raise NetworkSecurityException(f"Sample CSV not found at {csv_path}. CWD: {os.getcwd()}", sys)
62
 
63
 
64
  def export_data_into_feature_store(self, dataframe: pd.DataFrame):