File size: 551 Bytes
6ea0d31
cbce115
3c2cc03
5ea5a9d
 
 
cbce115
5ea5a9d
767950e
 
549d8a7
767950e
 
 
 
92fca80
da4fff6
767950e
 
 
549d8a7
92fca80
 
767950e
34229e7
6ea0d31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from youtube_video import download_youtube_video
import gradio as gr

video_link = None
video_path = None

def app(video_link):
    video_link = video_link
    try:
        print(f"Received video link: {video_link}")

    except Exception as e:
        print(f"An error occurred: {str(e)}")
        return None

        

interface = gr.Interface(
    fn=app,
    inputs=gr.Textbox(label="Enter YouTube link"),
    outputs=[gr.Video(video_path), gr.Button("Download Video")]

    # outputs=gr.Video(label="Your result")
)

interface.launch(debug=True)