tykiww commited on
Commit
a84dcff
·
verified ·
1 Parent(s): 1fdcae0

Update services/embed_service/utils.py

Browse files
Files changed (1) hide show
  1. services/embed_service/utils.py +18 -6
services/embed_service/utils.py CHANGED
@@ -99,12 +99,24 @@ class VTTTranscriptLoader:
99
  date_obj = None
100
 
101
  # Pull dictionary here
102
- output = {
103
- 'title': file_path,
104
- 'duration': minutes,
105
- 'meeting_date': date_obj,
106
- 'speakers': list(set(speaker_list)),
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