sanchit-gandhi HF staff commited on
Commit
f7768d9
1 Parent(s): cfb356d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,8 +1,7 @@
1
  import gradio as gr
2
 
3
  def identity(audio):
4
- print(audio)
5
- return audio
6
 
7
  with gr.Blocks() as demo:
8
  with gr.Row():
@@ -11,7 +10,8 @@ with gr.Blocks() as demo:
11
  run_button = gr.Button("Generate audio")
12
  with gr.Column():
13
  audio_out = gr.Audio(type="filepath")
 
14
 
15
- run_button.click(fn=identity, inputs=[audio_in], outputs=[audio_out])
16
 
17
  demo.launch()
 
1
  import gradio as gr
2
 
3
  def identity(audio):
4
+ return audio, audio
 
5
 
6
  with gr.Blocks() as demo:
7
  with gr.Row():
 
10
  run_button = gr.Button("Generate audio")
11
  with gr.Column():
12
  audio_out = gr.Audio(type="filepath")
13
+ path_out = gr.Textbox(label="audio filepath")
14
 
15
+ run_button.click(fn=identity, inputs=[audio_in], outputs=[audio_out, path_out])
16
 
17
  demo.launch()