Spaces:
Runtime error
Runtime error
Salman11223
commited on
Commit
•
3c2cc03
1
Parent(s):
80b9a64
Update app.py
Browse files
app.py
CHANGED
@@ -1,16 +1,15 @@
|
|
1 |
from youtube_video import download_youtube_video
|
2 |
import gradio as gr
|
3 |
-
import pytube
|
4 |
-
from pytube import YouTube
|
5 |
-
|
6 |
-
|
7 |
|
8 |
def app(video_link):
|
9 |
-
video
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
)
|
15 |
-
|
16 |
-
interface.
|
|
|
|
|
|
|
|
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()
|