File size: 604 Bytes
6ea0d31
cfa72c4
cbce115
6f393e1
 
cbce115
4ac237d
6f393e1
3036b49
4ac237d
b5fb62f
c4d440c
c8f3f78
c4d440c
b584bfb
4ac237d
c4d440c
c3c5aca
3ffc046
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
27
28
29
30
31
32
33
34
35
from youtube_video import download_youtube_video
import requests
import gradio as gr


def app(video_link):
    video_path = download_youtube_video(video_link)
    route('/')
    data = requests.get('data', '')  # Extracting data from URL query parameter
    return video_path

interface = gr.Interface(

    fn=app,
    inputs=gr.Textbox(data, label="Enter YouTube link"),
    outputs=gr.Video(label = "video_path")
)

interface.launch(debug=True)







#@app.route('/')
#def index():
    
   # return render_template('index.html', data=data)

#if __name__ == '__main__':
 #   app.run(debug=True)