Update app.py
Browse files
app.py
CHANGED
@@ -30,17 +30,14 @@ if os.path.exists(JSON_PATH):
|
|
30 |
dataset = json.load(f)
|
31 |
|
32 |
for item in dataset:
|
33 |
-
|
34 |
category = item["category"].lower().replace(" ", "_")
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
frame_filename = os.path.basename(item["frame_path"])
|
42 |
-
item["frame_path"] = f"{DATASET_PATH}/all_signs/{frame_filename}"
|
43 |
|
|
|
|
|
44 |
else:
|
45 |
|
46 |
dataset = []
|
|
|
30 |
dataset = json.load(f)
|
31 |
|
32 |
for item in dataset:
|
|
|
33 |
category = item["category"].lower().replace(" ", "_")
|
34 |
|
35 |
+
# Convert absolute paths to relative ones
|
36 |
+
if item["video_clip_path"].startswith("/content/sign_language_dataset/"):
|
37 |
+
item["video_clip_path"] = item["video_clip_path"].replace("/content/sign_language_dataset/", f"{DATASET_PATH}/")
|
|
|
|
|
|
|
|
|
38 |
|
39 |
+
if item["frame_path"].startswith("/content/sign_language_dataset/"):
|
40 |
+
item["frame_path"] = item["frame_path"].replace("/content/sign_language_dataset/", f"{DATASET_PATH}/")
|
41 |
else:
|
42 |
|
43 |
dataset = []
|