Salman11223 commited on
Commit
36ecbae
·
verified ·
1 Parent(s): 456ca01

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ imort download_youtube_video
2
+
3
+ def app(video_link):
4
+ downloaded_file_path = download_youtube_video(video_link)
5
+ if downloaded_file_path:
6
+ # Do something with the downloaded video file, such as returning it to the user
7
+ with open(downloaded_file_path, 'rb') as f:
8
+ video_data = f.read()
9
+ # Return the video data here (e.g., send it as a response in a web application)
10
+
11
+ interface = gr.Interface(fn = app, inputs = [gr.components.Textbox(label="Enter youtube link")],
12
+ outputs=[gr.components.Video(label="Your result")]
13
+ )
14
+
15
+ interface.launch(debug=True)