Spaces:
Runtime error
Runtime error
Ahsen Khaliq
commited on
Commit
·
cd0d118
1
Parent(s):
2c54192
Update app.py
Browse files
app.py
CHANGED
@@ -175,7 +175,7 @@ model_synth = torch.load("synth2synth_full.pt", map_location="cpu").eval()
|
|
175 |
|
176 |
|
177 |
|
178 |
-
def inference(aud, effect_type,gain_dB,c0,c1,mix,width,max_length):
|
179 |
x_p, sample_rate = torchaudio.load(aud)
|
180 |
|
181 |
effect_type = effect_type #@param ["Compressor", "Reverb", "Amp", "Analog Delay", "Synth2Synth"]
|
@@ -185,8 +185,8 @@ def inference(aud, effect_type,gain_dB,c0,c1,mix,width,max_length):
|
|
185 |
mix = mix #@param {type:"slider", min:0, max:100, step:1}
|
186 |
width = width #@param {type:"slider", min:0, max:100, step:1}
|
187 |
max_length = max_length#@param {type:"slider", min:5, max:120, step:1}
|
188 |
-
stereo =
|
189 |
-
tail =
|
190 |
|
191 |
# select model type
|
192 |
if effect_type == "Compressor":
|
@@ -272,7 +272,9 @@ gr.Interface(
|
|
272 |
gr.inputs.Slider(minimum=-10, maximum=10, step=1, default=3, label="c1"),
|
273 |
gr.inputs.Slider(minimum=0, maximum=100, step=1, default=70, label="mix"),
|
274 |
gr.inputs.Slider(minimum=0, maximum=100, step=1, default=50, label="width"),
|
275 |
-
gr.inputs.Slider(minimum=5, maximum=120, step=1, default=30, label="max length")
|
|
|
|
|
276 |
gr.outputs.Audio(type="file", label="Output"),
|
277 |
title=title,
|
278 |
description=description,
|
|
|
175 |
|
176 |
|
177 |
|
178 |
+
def inference(aud, effect_type,gain_dB,c0,c1,mix,width,max_length,stereo,tail):
|
179 |
x_p, sample_rate = torchaudio.load(aud)
|
180 |
|
181 |
effect_type = effect_type #@param ["Compressor", "Reverb", "Amp", "Analog Delay", "Synth2Synth"]
|
|
|
185 |
mix = mix #@param {type:"slider", min:0, max:100, step:1}
|
186 |
width = width #@param {type:"slider", min:0, max:100, step:1}
|
187 |
max_length = max_length#@param {type:"slider", min:5, max:120, step:1}
|
188 |
+
stereo = stereo #@param {type:"boolean"}
|
189 |
+
tail = tail #@param {type:"boolean"}
|
190 |
|
191 |
# select model type
|
192 |
if effect_type == "Compressor":
|
|
|
272 |
gr.inputs.Slider(minimum=-10, maximum=10, step=1, default=3, label="c1"),
|
273 |
gr.inputs.Slider(minimum=0, maximum=100, step=1, default=70, label="mix"),
|
274 |
gr.inputs.Slider(minimum=0, maximum=100, step=1, default=50, label="width"),
|
275 |
+
gr.inputs.Slider(minimum=5, maximum=120, step=1, default=30, label="max length"),
|
276 |
+
gr.inputs.Checkbox(default=True, label="stereo"),
|
277 |
+
gr.inputs.Checkbox(default=True, label="tail")],
|
278 |
gr.outputs.Audio(type="file", label="Output"),
|
279 |
title=title,
|
280 |
description=description,
|