Salman11223
commited on
Commit
•
4ac237d
1
Parent(s):
c4d440c
Update app.py
Browse files
app.py
CHANGED
@@ -2,22 +2,13 @@ from youtube_video import download_youtube_video
|
|
2 |
import gradio as gr
|
3 |
|
4 |
def app(video_link):
|
5 |
-
|
6 |
-
|
7 |
-
video_path = download_youtube_video(video_link)
|
8 |
-
print(f"Downloaded video path: {video_path}")
|
9 |
-
return gr.Video(video_path)
|
10 |
-
except Exception as e:
|
11 |
-
print(f"An error occurred: {str(e)}")
|
12 |
-
return None
|
13 |
-
|
14 |
-
|
15 |
|
16 |
interface = gr.Interface(
|
17 |
fn=app,
|
18 |
inputs=gr.Textbox(label="Enter YouTube link"),
|
19 |
-
outputs=
|
20 |
-
|
21 |
)
|
22 |
|
23 |
interface.launch(debug=True)
|
|
|
2 |
import gradio as gr
|
3 |
|
4 |
def app(video_link):
|
5 |
+
video_path = download_youtube_video(video_link)
|
6 |
+
return video_path
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
interface = gr.Interface(
|
9 |
fn=app,
|
10 |
inputs=gr.Textbox(label="Enter YouTube link"),
|
11 |
+
outputs=gr.Video(label = "video_path")
|
|
|
12 |
)
|
13 |
|
14 |
interface.launch(debug=True)
|