BoldActionMan commited on
Commit
11031b4
·
verified ·
1 Parent(s): 2fe9bc4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -17,11 +17,11 @@ import ffmpeg
17
  def process_video(video_file, youtube_url, language_choice):
18
  if language_choice == None:
19
  return None, "Select a language to translate to."
20
- elif video_file == None and youtube_url == None:
21
  return None, "Upload either a video or a valid youtube URL."
22
- elif video_file != None and youtube_url != None:
23
  return None, "Videos contradict. Delete either the uploaded video or youtube URL."
24
- elif video_file == None and youtube_url != None:
25
  yt = YouTube(youtube_url)
26
  yt.streams.filter(progressive=True, file_extension='mp4').first().download(filename="original.mp4")
27
  video_file = "original.mp4"
 
17
  def process_video(video_file, youtube_url, language_choice):
18
  if language_choice == None:
19
  return None, "Select a language to translate to."
20
+ elif video_file == None and youtube_url == "":
21
  return None, "Upload either a video or a valid youtube URL."
22
+ elif video_file != None and youtube_url != "":
23
  return None, "Videos contradict. Delete either the uploaded video or youtube URL."
24
+ elif video_file == None and youtube_url != "":
25
  yt = YouTube(youtube_url)
26
  yt.streams.filter(progressive=True, file_extension='mp4').first().download(filename="original.mp4")
27
  video_file = "original.mp4"