Omnibus commited on
Commit
7f88dd7
·
1 Parent(s): e71e0bd

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -0
app.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import unicode_literals
2
+ #import youtube_dl as yt
3
+ import gradio as gr
4
+ import youtube_dl
5
+
6
+ def dl(inp):
7
+ out = None
8
+
9
+ ydl_opts = {}
10
+ with youtube_dl.YoutubeDL(ydl_opts) as ydl:
11
+ out = ydl.download([f'{inp}'])
12
+ return out
13
+
14
+
15
+ with gr.Blocks() as app:
16
+ inp_url = gr.Textbox()
17
+ go_btn = gr.Button()
18
+ outp_vid=gr.Video()
19
+ go_btn.click(dl,inp_url,outp_vid)
20
+
21
+ app.launch()