Salman11223 commited on
Commit
34229e7
1 Parent(s): 509aa7d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -10
app.py CHANGED
@@ -1,15 +1,17 @@
1
  from youtube_video import download_youtube_video
2
  import gradio as gr
3
 
4
- def app(video_link):
5
- print(f"Received video link: {video_link}")
6
-
7
- video_path = download_youtube_video(video_link)
8
- print(f"Downloaded video path: {video_path}")
9
-
10
- return gr.Video(video_path)
11
 
12
- interface = gr.Interface(fn=app,
13
- inputs=gr.Textbox(label="Enter YouTube link"),
14
- outputs=gr.Video(label="Your result"))
 
 
 
 
 
 
15
  interface.launch(debug = True)
 
1
  from youtube_video import download_youtube_video
2
  import gradio as gr
3
 
4
+ def huggingface_app(video_link):
5
+ # You can use the video link to download the video and return the path
6
+ return download_and_return(video_link)
 
 
 
 
7
 
8
+ # Deploy the Gradio interface with the Hugging Face app
9
+ interface = gr.Interface(
10
+ fn=huggingface_app,
11
+ inputs=gr.Textbox(label="Enter YouTube link"),
12
+ outputs=gr.Video(label="Your result"),
13
+ live=True # Set live to True for continuous updates
14
+ )
15
+
16
+ # Launch the interface
17
  interface.launch(debug = True)