Maximo Fernandez commited on
Commit
3b3a878
·
1 Parent(s): 153db1c

Get if video and audio is donwloaded

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -502,6 +502,13 @@ def get_audio_and_video_from_video(url):
502
  audio = "audios/download_audio.mp3"
503
  video = "videos/download_video.mp4"
504
 
 
 
 
 
 
 
 
505
  return (
506
  gr.Textbox(value="Ok"),
507
  gr.Textbox(value=audio),
 
502
  audio = "audios/download_audio.mp3"
503
  video = "videos/download_video.mp4"
504
 
505
+ if not os.path.exists(audio):
506
+ return (
507
+ gr.Textbox(value="Error downloading audio"),
508
+ gr.Textbox(value=""),
509
+ gr.Textbox(value=""),
510
+ )
511
+
512
  return (
513
  gr.Textbox(value="Ok"),
514
  gr.Textbox(value=audio),