artificialguybr commited on
Commit
79ce0ab
1 Parent(s): ddb704c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -49,7 +49,7 @@ def check_for_faces(video_path):
49
 
50
  def process_video(radio, video, target_language):
51
  if target_language is None:
52
- return gr.Interface.Warnings("Please select a Target Language for Dubbing.")
53
 
54
  run_uuid = uuid.uuid4().hex[:6]
55
  output_filename = f"{run_uuid}_resized_video.mp4"
@@ -66,7 +66,7 @@ def process_video(radio, video, target_language):
66
 
67
  if video_duration > 60:
68
  os.remove(video_path) # Delete the resized video
69
- return gr.Interface.Warnings("Video duration exceeds 1 minute. Please upload a shorter video.")
70
 
71
  ffmpeg.input(video_path).output(f"{run_uuid}_output_audio.wav", acodec='pcm_s24le', ar=48000, map='a').run()
72
 
 
49
 
50
  def process_video(radio, video, target_language):
51
  if target_language is None:
52
+ return gr.Error("Please select a Target Language for Dubbing.")
53
 
54
  run_uuid = uuid.uuid4().hex[:6]
55
  output_filename = f"{run_uuid}_resized_video.mp4"
 
66
 
67
  if video_duration > 60:
68
  os.remove(video_path) # Delete the resized video
69
+ return gr.Error("Video duration exceeds 1 minute. Please upload a shorter video.")
70
 
71
  ffmpeg.input(video_path).output(f"{run_uuid}_output_audio.wav", acodec='pcm_s24le', ar=48000, map='a').run()
72