Salman11223 commited on
Commit
bbc597b
1 Parent(s): 59b0b42

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -7
app.py CHANGED
@@ -1,15 +1,10 @@
1
  from youtube_video import download_youtube_video
2
  import gradio as gr
3
 
4
- video_link = None
5
- video_path = None
6
-
7
  def app(video_link):
8
- video_link = video_link
9
  try:
10
  print(f"Received video link: {video_link}")
11
  video_path = download_youtube_video(video_link)
12
- video_path = video_path
13
  print(f"Downloaded video path: {video_path}")
14
  return gr.Video(video_path)
15
  except Exception as e:
@@ -21,9 +16,8 @@ def app(video_link):
21
  interface = gr.Interface(
22
  fn=app,
23
  inputs=gr.Textbox(label="Enter YouTube link"),
24
- outputs=[gr.Video(video_path), gr.Button("Download Video")]
25
 
26
- # outputs=gr.Video(label="Your result")
27
  )
28
 
29
  interface.launch(debug=True)
 
1
  from youtube_video import download_youtube_video
2
  import gradio as gr
3
 
 
 
 
4
  def app(video_link):
 
5
  try:
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)
10
  except Exception as e:
 
16
  interface = gr.Interface(
17
  fn=app,
18
  inputs=gr.Textbox(label="Enter YouTube link"),
19
+ outputs=[gr.Video("video_path"), gr.Button("Download Video")],
20
 
 
21
  )
22
 
23
  interface.launch(debug=True)