File size: 632 Bytes
6ea0d31 3ffc046 cbce115 3c2cc03 cbce115 4ac237d c3c5aca c4d440c 3ffc046 c4d440c d7fc5dc 3ffc046 4ac237d c4d440c c3c5aca 3ffc046 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
from youtube_video import download_youtube_video
from flask import Flask, request, render_template
import gradio as gr
def app(video_link):
video_path = download_youtube_video(video_link)
return video_path
interface = gr.Interface(
data = request.args.get('data', ''), # Extracting data from URL query parameter
fn=app,
inputs=data,
#gr.Textbox(label="Enter YouTube link"),
outputs=gr.Video(label = "video_path")
)
interface.launch(debug=True)
#@app.route('/')
#def index():
# return render_template('index.html', data=data)
#if __name__ == '__main__':
# app.run(debug=True)
|