Update README.md
Browse files
README.md
CHANGED
@@ -42,9 +42,7 @@ The model is designed for autoregressive music generation. It generates the cont
|
|
42 |
## How to Get Started with the Model
|
43 |
|
44 |
Use the code below to get started with the model.
|
45 |
-
You will need the `miditok
|
46 |
-
|
47 |
-
You will also need to manually download the `tokenizer.conf` file from the [repo files](https://huggingface.co/Natooz/Maestro-REMI-bpe20k/tree/main).
|
48 |
|
49 |
```Python
|
50 |
import torch
|
@@ -54,7 +52,7 @@ from miditoolkit import MidiFile
|
|
54 |
|
55 |
torch.set_default_device("cuda")
|
56 |
model = AutoModelForCausalLM.from_pretrained("Natooz/Maestro-REMI-bpe20k", trust_remote_code=True, torch_dtype="auto")
|
57 |
-
tokenizer = REMI(
|
58 |
input_midi = MidiFile("path/to/file.mid")
|
59 |
input_tokens = tokenizer(input_midi)
|
60 |
|
|
|
42 |
## How to Get Started with the Model
|
43 |
|
44 |
Use the code below to get started with the model.
|
45 |
+
You will need the `miditok` (>=v2.1.7), `transformers` and `torch` packages to make it run, that can be installed with pip.
|
|
|
|
|
46 |
|
47 |
```Python
|
48 |
import torch
|
|
|
52 |
|
53 |
torch.set_default_device("cuda")
|
54 |
model = AutoModelForCausalLM.from_pretrained("Natooz/Maestro-REMI-bpe20k", trust_remote_code=True, torch_dtype="auto")
|
55 |
+
tokenizer = REMI.from_pretrained("Natooz/Maestro-REMI-bpe20k")
|
56 |
input_midi = MidiFile("path/to/file.mid")
|
57 |
input_tokens = tokenizer(input_midi)
|
58 |
|