DSatishchandra commited on
Commit
6731aa1
Β·
verified Β·
1 Parent(s): e72349d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -5
app.py CHANGED
@@ -19,14 +19,22 @@ thermal_service = ThermalService()
19
  shadow_detection = ShadowDetection()
20
  salesforce_dispatcher = SalesforceDispatcher()
21
 
22
- # Paths to video files
 
 
 
23
  VIDEO_PATHS = {
24
- "Day Feed": "data/drone_day.mp4",
25
- "Night Feed": "data/night_intrusion.mp4",
26
- "Thermal Feed": "data/thermal_hotspot.mp4",
27
- "Shadow/Dust Feed": "data/shadow_dust_issue.mp4",
28
  }
29
 
 
 
 
 
 
30
  # State for live feed
31
  class LiveFeedState:
32
  def __init__(self):
 
19
  shadow_detection = ShadowDetection()
20
  salesforce_dispatcher = SalesforceDispatcher()
21
 
22
+ # Get the absolute path of the directory where this script (app.py) resides
23
+ BASE_DIR = os.path.dirname(os.path.abspath(__file__))
24
+
25
+ # Paths to video files with absolute paths
26
  VIDEO_PATHS = {
27
+ "Day Feed": os.path.join(BASE_DIR, "data", "drone_day.mp4"),
28
+ "Night Feed": os.path.join(BASE_DIR, "data", "night_intrusion.mp4"),
29
+ "Thermal Feed": os.path.join(BASE_DIR, "data", "thermal_hotspot.mp4"),
30
+ "Shadow/Dust Feed": os.path.join(BASE_DIR, "data", "shadow_dust_issue.mp4"),
31
  }
32
 
33
+ # Debug prints to verify paths and existence of files
34
+ for feed_name, path in VIDEO_PATHS.items():
35
+ print(f"Video path for '{feed_name}': {path}")
36
+ print(f"Exists? {os.path.exists(path)}")
37
+
38
  # State for live feed
39
  class LiveFeedState:
40
  def __init__(self):