File size: 569 Bytes
6ea0d31 cbce115 3c2cc03 cbce115 767950e 59b0b42 c4d440c 767950e c4d440c c3c5aca c4d440c c3c5aca c4d440c c3c5aca c4d440c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
from youtube_video import download_youtube_video
import gradio as gr
def app(video_link):
try:
print(f"Received video link: {video_link}")
video_path = download_youtube_video(video_link)
print(f"Downloaded video path: {video_path}")
return gr.Video(video_path)
except Exception as e:
print(f"An error occurred: {str(e)}")
return None
interface = gr.Interface(
fn=app,
inputs=gr.Textbox(label="Enter YouTube link"),
outputs=[gr.Video(label = "video_path")],
)
interface.launch(debug=True) |