Spaces:
Runtime error
Runtime error
product2204
commited on
Commit
•
974a2b2
1
Parent(s):
1bcd797
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ from transformers import pipeline
|
|
2 |
from youtube_transcript_api import YouTubeTranscriptApi
|
3 |
from IPython.display import YouTubeVideo
|
4 |
|
5 |
-
def summarize(result)
|
6 |
summarizer = pipeline('summarization')
|
7 |
num_iters = int(len(result)/1000)
|
8 |
summarized_text = []
|
@@ -18,7 +18,7 @@ def summarize(result)
|
|
18 |
summarized_text.append(out)
|
19 |
st.write(summarized_text)
|
20 |
|
21 |
-
def get_transcript(video_id)
|
22 |
#youtube_video = "https://www.youtube.com/watch?v=A4OmtyaBHFE"
|
23 |
#video_id = youtube_video.split("=")[1]
|
24 |
#video_id
|
@@ -33,7 +33,7 @@ def get_transcript(video_id)
|
|
33 |
print(len(result))
|
34 |
st.write(result)
|
35 |
|
36 |
-
def main()
|
37 |
video_id=st.text_input("enter video id ")
|
38 |
if video_id:
|
39 |
get_transcript(video_id)
|
|
|
2 |
from youtube_transcript_api import YouTubeTranscriptApi
|
3 |
from IPython.display import YouTubeVideo
|
4 |
|
5 |
+
def summarize(result):
|
6 |
summarizer = pipeline('summarization')
|
7 |
num_iters = int(len(result)/1000)
|
8 |
summarized_text = []
|
|
|
18 |
summarized_text.append(out)
|
19 |
st.write(summarized_text)
|
20 |
|
21 |
+
def get_transcript(video_id):
|
22 |
#youtube_video = "https://www.youtube.com/watch?v=A4OmtyaBHFE"
|
23 |
#video_id = youtube_video.split("=")[1]
|
24 |
#video_id
|
|
|
33 |
print(len(result))
|
34 |
st.write(result)
|
35 |
|
36 |
+
def main():
|
37 |
video_id=st.text_input("enter video id ")
|
38 |
if video_id:
|
39 |
get_transcript(video_id)
|