Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -7,8 +7,8 @@ import re
|
|
7 |
from pytubefix import YouTube
|
8 |
|
9 |
|
10 |
-
def get_text(
|
11 |
-
yt = YouTube(
|
12 |
|
13 |
caption = yt.captions.get_by_language_code('en')
|
14 |
transcript = caption.generate_srt_captions()
|
@@ -19,7 +19,7 @@ def get_text(video_id):
|
|
19 |
# Extract text from every third line (lines 3, 6, 9, ...)
|
20 |
extracted_text = " ".join(lines[i] for i in range(2, len(lines), 4))
|
21 |
|
22 |
-
print(extracted_text)
|
23 |
return extracted_text
|
24 |
|
25 |
def create_qdrant_database(url):
|
|
|
7 |
from pytubefix import YouTube
|
8 |
|
9 |
|
10 |
+
def get_text(url):
|
11 |
+
yt = YouTube(url)
|
12 |
|
13 |
caption = yt.captions.get_by_language_code('en')
|
14 |
transcript = caption.generate_srt_captions()
|
|
|
19 |
# Extract text from every third line (lines 3, 6, 9, ...)
|
20 |
extracted_text = " ".join(lines[i] for i in range(2, len(lines), 4))
|
21 |
|
22 |
+
#print(extracted_text)
|
23 |
return extracted_text
|
24 |
|
25 |
def create_qdrant_database(url):
|