vid-url-dl / app.py
Omnibus's picture
Update app.py
05feea2
raw
history blame
404 Bytes
import gradio as gr
import yt_dlp
import os
def dl(inp):
out = None
inp_out=inp.strip("https://")
inp_out=inp_out.replace("/","_")
os.system(f'yt-dlp "{inp}" --trim-filenames 100 -o "{inp_out}.mp4"')
return f"{inp_out}.mp4"
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()