Spaces:
Sleeping
Sleeping
UPDATE: Analyzer
Browse files- functions.py +13 -8
functions.py
CHANGED
@@ -299,14 +299,19 @@ def getTextFromImagePDF(pdfBytes):
|
|
299 |
return text
|
300 |
|
301 |
def getTranscript(urls: str):
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
|
|
|
|
|
|
|
|
|
|
310 |
|
311 |
|
312 |
def analyzeData(query, dataframe):
|
|
|
299 |
return text
|
300 |
|
301 |
def getTranscript(urls: str):
|
302 |
+
urls = urls.split(",")
|
303 |
+
texts = []
|
304 |
+
for url in urls:
|
305 |
+
try:
|
306 |
+
loader = YoutubeLoader.from_youtube_url(
|
307 |
+
url, add_video_info = False
|
308 |
+
)
|
309 |
+
doc = " ".join([x.page_content for x in loader.load()])
|
310 |
+
texts.append(doc)
|
311 |
+
except:
|
312 |
+
doc = ""
|
313 |
+
texts.append(doc)
|
314 |
+
return "\n\n".join(texts)
|
315 |
|
316 |
|
317 |
def analyzeData(query, dataframe):
|