IanRonk commited on
Commit
d4f3259
1 Parent(s): d810840
Files changed (2) hide show
  1. app.py +2 -1
  2. functions/convert_time.py +1 -1
app.py CHANGED
@@ -17,7 +17,7 @@ def pipeline(video_url):
17
  sentences = re.split(r"[\.\!\?]\s", punctuated_text)
18
  classification, probs = predict_from_document(sentences)
19
  # return punctuated_text
20
- times = match_mask_and_transcript(sentences, transcript, classification)
21
  return [
22
  {
23
  "start": "12:05",
@@ -25,6 +25,7 @@ def pipeline(video_url):
25
  "classification": str(classification),
26
  "probabilities": probs,
27
  "times": times,
 
28
  }
29
  ]
30
 
 
17
  sentences = re.split(r"[\.\!\?]\s", punctuated_text)
18
  classification, probs = predict_from_document(sentences)
19
  # return punctuated_text
20
+ times, timestamps = match_mask_and_transcript(sentences, transcript, classification)
21
  return [
22
  {
23
  "start": "12:05",
 
25
  "classification": str(classification),
26
  "probabilities": probs,
27
  "times": times,
28
+ "timestamps": timestamps,
29
  }
30
  ]
31
 
functions/convert_time.py CHANGED
@@ -47,4 +47,4 @@ def match_mask_and_transcript(split_punct, transcript, classification):
47
  else:
48
  times[current] = (times[current][0], elem[0] + elem[1])
49
  current_time = elem[0] + elem[1]
50
- return times
 
47
  else:
48
  times[current] = (times[current][0], elem[0] + elem[1])
49
  current_time = elem[0] + elem[1]
50
+ return times, timestamps