File size: 489 Bytes
91d54bf
cbce115
 
3c2cc03
cbce115
 
 
 
 
 
 
34229e7
cbce115
 
 
509aa7d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

    from youtube_video import download_youtube_video
import gradio as gr

def app(video_link):
    print(f"Received video link: {video_link}")
    
    video_path = download_youtube_video(video_link)
    print(f"Downloaded video path: {video_path}")
    
    return gr.Video(video_path)

interface = gr.Interface(fn=app, 
                         inputs=gr.Textbox(label="Enter YouTube link"),
                         outputs=gr.Video(label="Your result"))
interface.launch(debug = True)