Spaces:
Runtime error
Runtime error
Add correct return
Browse files
app.py
CHANGED
@@ -18,16 +18,17 @@ def pipeline(video_url):
|
|
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 |
-
|
24 |
-
"
|
25 |
-
"
|
26 |
-
"
|
27 |
-
"
|
28 |
-
"
|
29 |
-
|
30 |
-
|
|
|
31 |
|
32 |
|
33 |
# print(pipeline("VL5M5ZihJK4"))
|
|
|
18 |
classification, probs = predict_from_document(sentences)
|
19 |
# return punctuated_text
|
20 |
times, timestamps = match_mask_and_transcript(sentences, transcript, classification)
|
21 |
+
return [{"begin": time[0], "end": time[1]} for time in times]
|
22 |
+
# return [
|
23 |
+
# {
|
24 |
+
# "start": "12:05",
|
25 |
+
# "end": "12:52",
|
26 |
+
# "classification": str(classification),
|
27 |
+
# "probabilities": probs,
|
28 |
+
# "times": times,
|
29 |
+
# "timestamps": timestamps,
|
30 |
+
# }
|
31 |
+
# ]
|
32 |
|
33 |
|
34 |
# print(pipeline("VL5M5ZihJK4"))
|