viddlr / app.py
charliebaby2023's picture
Update app.py
79c71e7 verified
raw
history blame
548 Bytes
from youtube_video import download_youtube_video
import requests
from huggingface_hub import InferenceClient
import gradio as gr
data = 'https://www.youtube.com/watch?v=ETDEuH3YL7I' #'https://www.youtube.com/watch?v=bJ5FDtgOwjo'
def app(video_link):
video_path = download_youtube_video(video_link)
return video_path
interface = gr.Interface(
fn=app,
inputs=gr.Textbox(data, label="Enter YouTube link"),
outputs=gr.Video(label = "video_path")
)
#gr.Interface.queue(api_open=True)
interface.launch(debug=True)