Spaces:
Runtime error
Runtime error
Salman11223
commited on
Commit
•
34229e7
1
Parent(s):
509aa7d
Update app.py
Browse files
app.py
CHANGED
@@ -1,15 +1,17 @@
|
|
1 |
from youtube_video import download_youtube_video
|
2 |
import gradio as gr
|
3 |
|
4 |
-
def
|
5 |
-
|
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
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
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)
|