BoldActionMan
commited on
Commit
•
a818c02
1
Parent(s):
5c08664
Update app.py
Browse files
app.py
CHANGED
@@ -15,11 +15,11 @@ from concurrent.futures import ThreadPoolExecutor
|
|
15 |
import ffmpeg
|
16 |
|
17 |
def process_video(video_file, youtube_url, language_choice):
|
18 |
-
if language_choice == None:
|
19 |
return None
|
20 |
if video_file != None and youtube_url != None:
|
21 |
return None
|
22 |
-
elif youtube_url != None:
|
23 |
yt = YouTube(youtube_url)
|
24 |
yt.streams.filter(progressive=True, file_extension='mp4').first().download(filename="original.mp4")
|
25 |
video_file = "original.mp4"
|
|
|
15 |
import ffmpeg
|
16 |
|
17 |
def process_video(video_file, youtube_url, language_choice):
|
18 |
+
if language_choice == None or (video_file == None and youtube_url == None):
|
19 |
return None
|
20 |
if video_file != None and youtube_url != None:
|
21 |
return None
|
22 |
+
elif video_file == None and youtube_url != None:
|
23 |
yt = YouTube(youtube_url)
|
24 |
yt.streams.filter(progressive=True, file_extension='mp4').first().download(filename="original.mp4")
|
25 |
video_file = "original.mp4"
|