from youtube_video import download_youtube_video import requests from huggingface_hub import InferenceClient import gradio as gr #def my_inference_function(name): # return "Heldddddddddddddddlo " + name + "!" data1=0 data2=0 #data = 'https://www.youtube.com/watch?v=ETDEuH3YL7I' #'https://www.youtube.com/watch?v=bJ5FDtgOwjo' def my_inference_function(data): data2=data return "serverside says hi " + data2 + "!" def app(video_link): video_path = download_youtube_video(video_link) return video_path interface = gr.Interface( fn=app, inputs=gr.Textbox(data2, label="Enter YouTube link"),"text", outputs=gr.Video(label = "video_path"), examples=[ ["Jill"], ["Sam"] ], title="_ _", description="_ _ _", article="_" ) #gr.Interface.queue(api_open=True) #gradio_interface.launch() interface.launch(debug=True) gradio_interface.launch()