Salman11223 commited on
Commit
3c2cc03
1 Parent(s): 80b9a64

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -12
app.py CHANGED
@@ -1,16 +1,15 @@
1
  from youtube_video import download_youtube_video
2
  import gradio as gr
3
- import pytube
4
- from pytube import YouTube
5
-
6
-
7
 
8
  def app(video_link):
9
- video = download_youtube_video(video_link)
10
- return gr.Video(video)
11
-
12
- interface = gr.Interface(fn = app, inputs = [gr.components.Textbox(label="Enter youtube link")],
13
- outputs=[gr.components.Video(label="Your result")]
14
- )
15
-
16
- interface.launch(debug=True)
 
 
 
 
1
  from youtube_video import download_youtube_video
2
  import gradio as gr
 
 
 
 
3
 
4
  def app(video_link):
5
+ print(f"Received video link: {video_link}")
6
+
7
+ video_path = download_youtube_video(video_link)
8
+ print(f"Downloaded video path: {video_path}")
9
+
10
+ return gr.Video(video_path)
11
+
12
+ interface = gr.Interface(fn=app,
13
+ inputs=gr.Textbox(label="Enter YouTube link"),
14
+ outputs=gr.Video(label="Your result"))
15
+ interface.launch()