tky823 commited on
Commit
4e5049e
·
verified ·
1 Parent(s): 0c44fd0

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +29 -0
README.md ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license:
3
+ - mit
4
+ - apache-2.0
5
+ tags:
6
+ - musicfm
7
+ ---
8
+
9
+ # MusicFM
10
+
11
+ - MusicFM that supports `transformers.AutoModel`.
12
+ - See https://github.com/minzwon/musicfm/blob/master/README.md for details.
13
+
14
+ ```python
15
+ >>> import torch
16
+ >>> from transformers import AutoModel
17
+ >>> torch.manual_seed(0)
18
+ >>> wav = (torch.rand(4, 24000 * 30) - 0.5) * 2
19
+ >>> model = AutoModel.from_pretrained("tky823/MusicFMInferece", trust_remote_code=True)
20
+ >>> # get embeddings
21
+ >>> model.eval()
22
+ >>> emb = model(wav)
23
+ >>> emb.size()
24
+ torch.Size([4, 750, 1024])
25
+ ```
26
+
27
+ ## Ackowledgement
28
+
29
+ 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.