skytnt commited on
Commit
5ac6133
1 Parent(s): 8916a8e

fix max len

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -161,9 +161,9 @@ def run(model_name, tab, instruments, drum_kit, bpm, mid, midi_events, seed, see
161
  mid = tokenizer.tokenize(MIDI.midi2score(mid))
162
  mid = np.asarray(mid, dtype=np.int64)
163
  mid = mid[:int(midi_events)]
164
- max_len += len(mid)
165
  for token_seq in mid:
166
  mid_seq.append(token_seq.tolist())
 
167
  init_msgs = [create_msg("visualizer_clear", False)]
168
  for tokens in mid_seq:
169
  init_msgs.append(create_msg("visualizer_append", tokenizer.tokens2event(tokens)))
 
161
  mid = tokenizer.tokenize(MIDI.midi2score(mid))
162
  mid = np.asarray(mid, dtype=np.int64)
163
  mid = mid[:int(midi_events)]
 
164
  for token_seq in mid:
165
  mid_seq.append(token_seq.tolist())
166
+ max_len += len(mid)
167
  init_msgs = [create_msg("visualizer_clear", False)]
168
  for tokens in mid_seq:
169
  init_msgs.append(create_msg("visualizer_append", tokenizer.tokens2event(tokens)))