Commit
·
199eed7
1
Parent(s):
d35200a
Update app.py
Browse files
app.py
CHANGED
@@ -43,14 +43,15 @@ def video_to_descriptions(video, target_language="en"):
|
|
43 |
cap.release()
|
44 |
|
45 |
# Concatenate the descriptions
|
46 |
-
|
47 |
-
|
48 |
-
print("SUMMARIZATION : " +
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
audio_file = audio(translated_text)[0]["audio"]
|
|
|
54 |
|
55 |
return audio_file
|
56 |
|
|
|
43 |
cap.release()
|
44 |
|
45 |
# Concatenate the descriptions
|
46 |
+
concatenated_description = " ".join(descriptions)
|
47 |
+
summarized_description = Summarize(concatenated_description, max_length=31)[0]["summary_text"]
|
48 |
+
print("SUMMARIZATION : " + summarized_description)
|
49 |
+
|
50 |
+
translated_text = translator(summarized_description)[0]["translation_text"]
|
51 |
+
print("TRANSLATION : " + translated_text)
|
52 |
+
|
53 |
audio_file = audio(translated_text)[0]["audio"]
|
54 |
+
print("AUDIO : " + audio_file)
|
55 |
|
56 |
return audio_file
|
57 |
|