Spaces:
Sleeping
Sleeping
File size: 429 Bytes
d896bd4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import yaml
from constants import DEFAULT_MIDI_PROGRAMS, DEFAULT_SOUNDFONT_PATH
CONFIG_FILENAME = 'generation_config.yaml'
def load_config(filename):
with open(filename, 'r') as f:
config = yaml.safe_load(f)
return config
config = load_config(CONFIG_FILENAME)
MIDI_PROGRAMS = config.get('MIDI_PROGRAMS', DEFAULT_MIDI_PROGRAMS)
SOUNDFONT_PATH = config.get('SOUNDFONT_PATH', DEFAULT_SOUNDFONT_PATH) |