Blane187 commited on
Commit
af26451
·
verified ·
1 Parent(s): e9bd556

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import yt_dlp
2
  import gradio as gr
3
 
4
- def Greet(url, custom_name):
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
- greet_btn = gr.Button("Greet")
26
- greet_btn.click(fn=greet, inputs=url, custom_name, outputs=output, api_name="greet")
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()