ccolas commited on
Commit
c9ba38e
1 Parent(s): 6ff173c

Update src/music/pipeline/music_pipeline.py

Browse files
src/music/pipeline/music_pipeline.py CHANGED
@@ -65,8 +65,10 @@ def encode_music(url=None,
65
  # assert handcoded_rep_path is not None and representation_path is not None
66
  all_paths = dict(url=url, audio_path=audio_path, midi_path=midi_path, processed_path=processed_path, encoded_path=encoded_path,
67
  representation_path=representation_path, handcoded_rep_path=handcoded_rep_path)
68
- print('audio hash: ', hashlib.md5(open(audio_path, 'rb').read()).hexdigest())
69
- print('midi hash: ', hashlib.md5(open(midi_path, 'rb').read()).hexdigest())
 
 
70
  print('processed hash: ', hashlib.md5(open(processed_path, 'rb').read()).hexdigest())
71
  print('encoded hash: ', hashlib.md5(open(encoded_path, 'rb').read()).hexdigest())
72
  print('rep hash: ', hashlib.md5(open(representation_path, 'rb').read()).hexdigest())
65
  # assert handcoded_rep_path is not None and representation_path is not None
66
  all_paths = dict(url=url, audio_path=audio_path, midi_path=midi_path, processed_path=processed_path, encoded_path=encoded_path,
67
  representation_path=representation_path, handcoded_rep_path=handcoded_rep_path)
68
+ if audio_path is not None:
69
+ print('audio hash: ', hashlib.md5(open(audio_path, 'rb').read()).hexdigest())
70
+ if midi_path is not None:
71
+ print('midi hash: ', hashlib.md5(open(midi_path, 'rb').read()).hexdigest())
72
  print('processed hash: ', hashlib.md5(open(processed_path, 'rb').read()).hexdigest())
73
  print('encoded hash: ', hashlib.md5(open(encoded_path, 'rb').read()).hexdigest())
74
  print('rep hash: ', hashlib.md5(open(representation_path, 'rb').read()).hexdigest())