!git clone --depth 1 https://github.com/asigalov61/Monster-MIDI-Dataset
!pip install cupy-cuda12x
!pip install numpy==1.26.4
!pip install huggingface_hub
!pip install hf-transfer
!pip install ipywidgets
!pip install tqdmimport os
os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
from huggingface_hub import hf_hub_download
%cd ./Monster-MIDI-Dataset
import monster_search_and_filter
%cd ..hf_hub_download(repo_id='projectlosangeles/Monster-MIDI-Dataset',
repo_type='dataset',
filename='Monster-MIDI-Dataset-Ver-1-0-CC-BY-NC-SA.zip',
local_dir='./Monster-MIDI-Dataset/'
)%cd ./Monster-MIDI-Dataset
!unzip -o Monster-MIDI-Dataset-Ver-1-0-CC-BY-NC-SA.zip > /dev/null
%cd ..sigs_data_path = './Monster-MIDI-Dataset/SIGNATURES_DATA/MONSTER_SIGNATURES_DATA.pickle'
sigs_data = monster_search_and_filter.load_pickle(sigs_data_path)
sigs_dicts = monster_search_and_filter.load_signatures(sigs_data)
# Please note that you will need at least 80GB RAM or VRAM to run the search
X, global_union = monster_search_and_filter.precompute_signatures(sigs_dicts)
# IO dirs will be created on the first function run
# Make sure to put your master MIDIs into created Master-MIDI-Dataset dir
monster_search_and_filter.search_and_filter(sigs_dicts, X, global_union)