Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import yt_dlp
|
2 |
import gradio as gr
|
3 |
|
4 |
-
def
|
5 |
ydl_opts = {
|
6 |
'format': 'bestaudio/best',
|
7 |
'postprocessors': [{
|
@@ -22,7 +22,7 @@ with gr.Blocks() as demo:
|
|
22 |
url = gr.Textbox(label="url video")
|
23 |
custom_name = gr.Textbox(label="custom_name")
|
24 |
output = gr.Audio(label="output")
|
25 |
-
|
26 |
-
|
27 |
|
28 |
demo.launch()
|
|
|
1 |
import yt_dlp
|
2 |
import gradio as gr
|
3 |
|
4 |
+
def download_youtube_wav(url, custom_name):
|
5 |
ydl_opts = {
|
6 |
'format': 'bestaudio/best',
|
7 |
'postprocessors': [{
|
|
|
22 |
url = gr.Textbox(label="url video")
|
23 |
custom_name = gr.Textbox(label="custom_name")
|
24 |
output = gr.Audio(label="output")
|
25 |
+
download_youtube_wav_btn = gr.Button("Greet")
|
26 |
+
download_youtube_wav_btn.click(fn=download_youtube_wav, inputs=url custom_name, outputs=output)
|
27 |
|
28 |
demo.launch()
|