Spaces:
Runtime error
Runtime error
File size: 419 Bytes
7f88dd7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
from __future__ import unicode_literals
#import youtube_dl as yt
import gradio as gr
import youtube_dl
def dl(inp):
out = None
ydl_opts = {}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
out = ydl.download([f'{inp}'])
return out
with gr.Blocks() as app:
inp_url = gr.Textbox()
go_btn = gr.Button()
outp_vid=gr.Video()
go_btn.click(dl,inp_url,outp_vid)
app.launch()
|