Spaces:
Runtime error
Runtime error
KarthickAdopleAI
commited on
Commit
•
2960f93
1
Parent(s):
f64f517
Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,7 @@ import ffmpeg
|
|
6 |
from typing import List
|
7 |
from moviepy.editor import VideoFileClip
|
8 |
import nltk
|
|
|
9 |
from sklearn.feature_extraction.text import TfidfVectorizer
|
10 |
from langchain import HuggingFaceHub, PromptTemplate, LLMChain
|
11 |
import gradio as gr
|
@@ -416,13 +417,13 @@ class VideoAnalytics:
|
|
416 |
# Generate summary, important sentences, and topics
|
417 |
summary = self.generate_video_summary()
|
418 |
self.write_text_files(summary,"Summary")
|
419 |
-
summary_voice = save_audio_with_gtts(summary,"summary.mp3")
|
420 |
important_sentences = self.extract_video_important_sentence()
|
421 |
self.write_text_files(important_sentences,"Important_Sentence")
|
422 |
-
important_sentences_voice = save_audio_with_gtts(important_sentences,"important_sentences.mp3")
|
423 |
topics = self.generate_topics()
|
424 |
self.write_text_files(topics,"Topics")
|
425 |
-
topics_voice = save_audio_with_gtts(topics,"topics.mp3")
|
426 |
|
427 |
# Return the generated summary, important sentences, and topics
|
428 |
return summary,important_sentences,topics,summary_voice,important_sentences_voice,topics_voice
|
|
|
6 |
from typing import List
|
7 |
from moviepy.editor import VideoFileClip
|
8 |
import nltk
|
9 |
+
from gtts import gTTS
|
10 |
from sklearn.feature_extraction.text import TfidfVectorizer
|
11 |
from langchain import HuggingFaceHub, PromptTemplate, LLMChain
|
12 |
import gradio as gr
|
|
|
417 |
# Generate summary, important sentences, and topics
|
418 |
summary = self.generate_video_summary()
|
419 |
self.write_text_files(summary,"Summary")
|
420 |
+
summary_voice = self.save_audio_with_gtts(summary,"summary.mp3")
|
421 |
important_sentences = self.extract_video_important_sentence()
|
422 |
self.write_text_files(important_sentences,"Important_Sentence")
|
423 |
+
important_sentences_voice = self.save_audio_with_gtts(important_sentences,"important_sentences.mp3")
|
424 |
topics = self.generate_topics()
|
425 |
self.write_text_files(topics,"Topics")
|
426 |
+
topics_voice = self.save_audio_with_gtts(topics,"topics.mp3")
|
427 |
|
428 |
# Return the generated summary, important sentences, and topics
|
429 |
return summary,important_sentences,topics,summary_voice,important_sentences_voice,topics_voice
|