Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,14 +19,22 @@ thermal_service = ThermalService()
|
|
| 19 |
shadow_detection = ShadowDetection()
|
| 20 |
salesforce_dispatcher = SalesforceDispatcher()
|
| 21 |
|
| 22 |
-
#
|
|
|
|
|
|
|
|
|
|
| 23 |
VIDEO_PATHS = {
|
| 24 |
-
"Day Feed": "data
|
| 25 |
-
"Night Feed": "data
|
| 26 |
-
"Thermal Feed": "data
|
| 27 |
-
"Shadow/Dust Feed": "data
|
| 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):
|