Spaces:
Sleeping
Sleeping
Update services/embed_service/utils.py
Browse files
services/embed_service/utils.py
CHANGED
@@ -99,12 +99,24 @@ class VTTTranscriptLoader:
|
|
99 |
date_obj = None
|
100 |
|
101 |
# Pull dictionary here
|
102 |
-
output = {
|
103 |
-
|
104 |
-
|
105 |
-
'
|
106 |
-
|
107 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
|
109 |
return output
|
110 |
|
|
|
99 |
date_obj = None
|
100 |
|
101 |
# Pull dictionary here
|
102 |
+
output = {}
|
103 |
+
|
104 |
+
if file_path is not None:
|
105 |
+
output['title'] = file_path
|
106 |
+
else:
|
107 |
+
print("file path is not written in metadata")
|
108 |
+
if minutes is not None:
|
109 |
+
output['duration'] = minutes
|
110 |
+
else:
|
111 |
+
print("duration is not written in metadata")
|
112 |
+
if date_obj is not None:
|
113 |
+
output['meeting_date'] = date_obj
|
114 |
+
else:
|
115 |
+
print("meeting data is not written in metadata")
|
116 |
+
if speaker_list is not None:
|
117 |
+
output['speakers'] = list(set(speaker_list))
|
118 |
+
else:
|
119 |
+
print("speakers not written in metadata")
|
120 |
|
121 |
return output
|
122 |
|