Download src/data/open_chords.py from adhooge/gcds: direct link, hf CLI and curl.
- Browser
- Download file 180 Bytes
-
https://huggingface.co/spaces/adhooge/gcds/resolve/main/src/data/open_chords.py
- Command line
-
hf download hf://spaces/adhooge/gcds/src/data/open_chords.py
-
curl -L -o open_chords.py https://huggingface.co/spaces/adhooge/gcds/resolve/main/src/data/open_chords.py
180 Bytes
| import torch | |
| def shape_is_open_chord(shape: str) -> bool: | |
| return '0' in shape | |
| def manyhot_is_open_chord(manyhot: torch.Tensor) -> bool: | |
| return (manyhot[:, 0] == 1).any() | |