viddlr / app.py
Salman11223's picture
Update app.py
cfdee17 verified
raw
history blame
650 Bytes
from download_youtube_video imort download_youtube_video
import gradio as gr
def app(video_link):
downloaded_file_path = download_youtube_video(video_link)
if downloaded_file_path:
# Do something with the downloaded video file, such as returning it to the user
with open(downloaded_file_path, 'rb') as f:
video_data = f.read()
# Return the video data here (e.g., send it as a response in a web application)
interface = gr.Interface(fn = app, inputs = [gr.components.Textbox(label="Enter youtube link")],
outputs=[gr.components.Video(label="Your result")]
)
interface.launch(debug=True)