File size: 616 Bytes
6ea0d31 cfa72c4 cbce115 b5fb62f cbce115 4ac237d b5fb62f c4d440c bfd5e20 c4d440c 2475d07 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 |
from youtube_video import download_youtube_video
import requests
import gradio as gr
app = (video_link)
@app.route('/')
def app(video_link):
video_path = download_youtube_video(video_link)
return video_path
interface = gr.Interface(
data = requests.get('data', ''), # Extracting data from URL query parameter
fn=app,
inputs=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)
|