B-K commited on
Commit
2941d3d
·
verified ·
1 Parent(s): 1bbd850

Upload tokenization_song2midi.py

Browse files
midi_tokenizer/tokenization_song2midi.py CHANGED
@@ -140,7 +140,7 @@ class Song2MIDIPerTokTokenizer(PythonBackend):
140
  "Input must be a Score, a path to a MIDI file, or a list of token IDs."
141
  )
142
 
143
- first_ids = get_input_ids(midi)
144
  second_ids = get_input_ids(midi_pair) if midi_pair is not None else None
145
 
146
  return self.prepare_for_model(
 
140
  "Input must be a Score, a path to a MIDI file, or a list of token IDs."
141
  )
142
 
143
+ first_ids = get_input_ids(midi) if midi is not None else []
144
  second_ids = get_input_ids(midi_pair) if midi_pair is not None else None
145
 
146
  return self.prepare_for_model(