Spaces:
Runtime error
Runtime error
ManishThota
commited on
Commit
•
018f6d4
1
Parent(s):
9e26eb1
Update multi_video_app.py
Browse files- multi_video_app.py +9 -9
multi_video_app.py
CHANGED
@@ -54,16 +54,16 @@ def process_single_video(video_path, standing, hands, location, screen) -> Dict:
|
|
54 |
response = describe_video(video_path, final_prompt)
|
55 |
final_response = f"<video_name>{video_name}</video_name>" + " \n" + response
|
56 |
|
57 |
-
conditions = {
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
}
|
63 |
|
64 |
-
for key, (condition, to_replace, replacement) in conditions.items():
|
65 |
-
|
66 |
-
|
67 |
|
68 |
# Parse the response to extract video name and annotations
|
69 |
parsed_content = parse_string(final_response, ["video_name", "annotation"])
|
|
|
54 |
response = describe_video(video_path, final_prompt)
|
55 |
final_response = f"<video_name>{video_name}</video_name>" + " \n" + response
|
56 |
|
57 |
+
# conditions = {
|
58 |
+
# 'standing': (standing, 'standing: 1', 'standing: None'),
|
59 |
+
# 'hands': (hands, 'hands.free: 1', 'hands.free: None'),
|
60 |
+
# 'location': (location, 'indoors: 1', 'indoors: None'),
|
61 |
+
# 'screen': (screen, 'screen.interaction_yes: 1', 'screen.interaction_yes: None')
|
62 |
+
# }
|
63 |
|
64 |
+
# for key, (condition, to_replace, replacement) in conditions.items():
|
65 |
+
# if not condition:
|
66 |
+
# final_response = final_response.replace(to_replace, replacement)
|
67 |
|
68 |
# Parse the response to extract video name and annotations
|
69 |
parsed_content = parse_string(final_response, ["video_name", "annotation"])
|