MusicFMInference / README.md
tky823's picture
Upload README.md with huggingface_hub
4e5049e verified
metadata
license:
  - mit
  - apache-2.0
tags:
  - musicfm

MusicFM

>>> import torch
>>> from transformers import AutoModel
>>> torch.manual_seed(0)
>>> wav = (torch.rand(4, 24000 * 30) - 0.5) * 2
>>> model = AutoModel.from_pretrained("tky823/MusicFMInferece",  trust_remote_code=True)
>>> # get embeddings
>>> model.eval()
>>> emb = model(wav)
>>> emb.size()
torch.Size([4, 750, 1024])

Ackowledgement

Most of the source code in this repository is based on code from @minzwon's repository https://github.com/minzwon/musicfm. We gratefully acknowledge their excellent work.