Salman11223 commited on
Commit
3066772
·
verified ·
1 Parent(s): a5cf303

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -6,7 +6,7 @@ def app(video_link):
6
  print(f"Received video link: {video_link}")
7
  video_path = download_youtube_video(video_link)
8
  print(f"Downloaded video path: {video_path}")
9
- return gr.File(video_path, label="Downloaded Video")
10
  except Exception as e:
11
  print(f"An error occurred: {str(e)}")
12
  return None
@@ -14,7 +14,7 @@ def app(video_link):
14
  interface = gr.Interface(
15
  fn=app,
16
  inputs=gr.Textbox(label="Enter YouTube link"),
17
- outputs=gr.File(label="Downloaded Video"), # Use gr.File for direct download
18
  )
19
 
20
  interface.launch(debug=True)
 
6
  print(f"Received video link: {video_link}")
7
  video_path = download_youtube_video(video_link)
8
  print(f"Downloaded video path: {video_path}")
9
+ return gr.Video(video_path, label="Downloaded Video")
10
  except Exception as e:
11
  print(f"An error occurred: {str(e)}")
12
  return None
 
14
  interface = gr.Interface(
15
  fn=app,
16
  inputs=gr.Textbox(label="Enter YouTube link"),
17
+ outputs=gr.Video(label="Downloaded Video"), # Use gr.File for direct download
18
  )
19
 
20
  interface.launch(debug=True)