Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -49,7 +49,7 @@ def synthesize(midi_file=None):
|
|
49 |
|
50 |
def run_example(midi_file=None, prompt="", neg_prompt="", duration=None, seed=0, cond=1, inf=20, guidance_scale=2.5, guess=False):
|
51 |
midi_synth = synthesize(midi_file)
|
52 |
-
if
|
53 |
duration = midi_synth[1].shape[0]/SAMPLE_RATE
|
54 |
gen_audio = predict(midi_file, prompt, neg_prompt, duration, seed, cond, inf, guidance_scale, guess)
|
55 |
return midi_synth, gen_audio
|
|
|
49 |
|
50 |
def run_example(midi_file=None, prompt="", neg_prompt="", duration=None, seed=0, cond=1, inf=20, guidance_scale=2.5, guess=False):
|
51 |
midi_synth = synthesize(midi_file)
|
52 |
+
if duration == 0:
|
53 |
duration = midi_synth[1].shape[0]/SAMPLE_RATE
|
54 |
gen_audio = predict(midi_file, prompt, neg_prompt, duration, seed, cond, inf, guidance_scale, guess)
|
55 |
return midi_synth, gen_audio
|