Commit
·
b513c56
1
Parent(s):
f5e0bf6
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ summarizer = pipeline("summarization")
|
|
10 |
|
11 |
def get_audio(url):
|
12 |
yt = YouTube(url)
|
13 |
-
if yt.length <
|
14 |
video = yt.streams.filter(only_audio=True).first()
|
15 |
out_file=video.download(output_path=".")
|
16 |
base, ext = os.path.splitext(out_file)
|
@@ -19,7 +19,7 @@ def get_audio(url):
|
|
19 |
a = new_file
|
20 |
return a
|
21 |
else:
|
22 |
-
raise gr.Error("Videos for transcription on this space are limited to 1.5 hours.")
|
23 |
return ""
|
24 |
|
25 |
def get_text(url):
|
|
|
10 |
|
11 |
def get_audio(url):
|
12 |
yt = YouTube(url)
|
13 |
+
if yt.length < 5400:
|
14 |
video = yt.streams.filter(only_audio=True).first()
|
15 |
out_file=video.download(output_path=".")
|
16 |
base, ext = os.path.splitext(out_file)
|
|
|
19 |
a = new_file
|
20 |
return a
|
21 |
else:
|
22 |
+
raise gr.Error("Videos for transcription on this space are limited to 1.5 hours. Sorry about this limit but some joker thought they could stop this tool from working by transcribing many extremely long videos.")
|
23 |
return ""
|
24 |
|
25 |
def get_text(url):
|