Ahsen Khaliq commited on
Commit
9569c96
1 Parent(s): 958411b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -4,14 +4,14 @@ os.system('pip freeze')
4
  from voicefixer import VoiceFixer
5
  import gradio as gr
6
  voicefixer = VoiceFixer()
7
- def inference(audio):
8
  voicefixer.restore(input=audio.name, # input wav file path
9
  output="output.wav", # output wav file path
10
  cuda=False, # whether to use gpu acceleration
11
- mode = 1) # You can try out mode 0, 1 to find out the best result
12
  return 'output.wav'
13
 
14
- inputs = gr.inputs.Audio(type="file", label="Input Audio")
15
  outputs = gr.outputs.Audio(type="file",label="Output Audio")
16
 
17
 
 
4
  from voicefixer import VoiceFixer
5
  import gradio as gr
6
  voicefixer = VoiceFixer()
7
+ def inference(audio,mode):
8
  voicefixer.restore(input=audio.name, # input wav file path
9
  output="output.wav", # output wav file path
10
  cuda=False, # whether to use gpu acceleration
11
+ mode = mode) # You can try out mode 0, 1 to find out the best result
12
  return 'output.wav'
13
 
14
+ inputs = [gr.inputs.Audio(type="file", label="Input Audio"),gr.inputs.Slider(minimum=0, maximum=1, step=0.1, default=0, label='mode')]
15
  outputs = gr.outputs.Audio(type="file",label="Output Audio")
16
 
17