Spaces:
Runtime error
Runtime error
File size: 596 Bytes
65f781f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
from glob import glob
import os
weight_files = glob('assets/weights/*', recursive=True)
indices_files = glob('assets/indices/*', recursive=True)
main_directory = "https://huggingface.co/spaces/darylfunggg/rvc-spleeter-voice/resolve/main/"
weights = {'custom': None}
for weight_file in weight_files:
weights[os.path.splitext(os.path.basename(weight_file))[0]] = f"{main_directory}{weight_file}"
indices = {'custom': None}
for indices_file in indices_files:
indices[os.path.basename(indices_file).split("_")[0]] = f"{main_directory}{indices_file}"
assert len(weights) == len(indices) |