lauraibnz commited on
Commit
c065dde
·
1 Parent(s): b488dd2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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 not duration:
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