m41w4r3.exe
commited on
Commit
•
8f7d113
1
Parent(s):
8bd6111
add miditok version
Browse files- .vscode/launch.json +16 -0
- playground.py +6 -5
- requirements.txt +2 -2
.vscode/launch.json
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
// Use IntelliSense to learn about possible attributes.
|
3 |
+
// Hover to view descriptions of existing attributes.
|
4 |
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
5 |
+
"version": "0.2.0",
|
6 |
+
"configurations": [
|
7 |
+
{
|
8 |
+
"name": "playground.py",
|
9 |
+
"type": "python",
|
10 |
+
"request": "launch",
|
11 |
+
"program": "playground.py",
|
12 |
+
"console": "integratedTerminal",
|
13 |
+
"justMyCode": false
|
14 |
+
}
|
15 |
+
]
|
16 |
+
}
|
playground.py
CHANGED
@@ -25,11 +25,7 @@ n_bar_generated = 8
|
|
25 |
model, tokenizer = LoadModel(
|
26 |
model_repo, from_huggingface=True, revision=revision
|
27 |
).load_model_and_tokenizer()
|
28 |
-
|
29 |
-
model,
|
30 |
-
tokenizer,
|
31 |
-
)
|
32 |
-
genesis.set_nb_bars_generated(n_bars=n_bar_generated)
|
33 |
|
34 |
miditok = get_miditok()
|
35 |
decoder = TextDecoder(miditok)
|
@@ -122,6 +118,11 @@ def instrument_row(default_inst):
|
|
122 |
|
123 |
|
124 |
with gr.Blocks(cache_examples=False) as demo:
|
|
|
|
|
|
|
|
|
|
|
125 |
state = gr.State([])
|
126 |
mixed_audio = gr.Audio(label="Mixed Audio")
|
127 |
piano_roll = gr.Plot(label="Piano Roll")
|
|
|
25 |
model, tokenizer = LoadModel(
|
26 |
model_repo, from_huggingface=True, revision=revision
|
27 |
).load_model_and_tokenizer()
|
28 |
+
|
|
|
|
|
|
|
|
|
29 |
|
30 |
miditok = get_miditok()
|
31 |
decoder = TextDecoder(miditok)
|
|
|
118 |
|
119 |
|
120 |
with gr.Blocks(cache_examples=False) as demo:
|
121 |
+
genesis = GenerateMidiText(
|
122 |
+
model,
|
123 |
+
tokenizer,
|
124 |
+
)
|
125 |
+
genesis.set_nb_bars_generated(n_bars=n_bar_generated)
|
126 |
state = gr.State([])
|
127 |
mixed_audio = gr.Audio(label="Mixed Audio")
|
128 |
piano_roll = gr.Plot(label="Piano Roll")
|
requirements.txt
CHANGED
@@ -7,11 +7,11 @@ pathlib
|
|
7 |
transformers
|
8 |
miditok
|
9 |
librosa
|
10 |
-
pretty_midi
|
11 |
pydub
|
12 |
scipy
|
13 |
datetime
|
14 |
torch
|
15 |
torchvision
|
16 |
fluidsynth
|
17 |
-
|
|
|
7 |
transformers
|
8 |
miditok
|
9 |
librosa
|
10 |
+
pretty_midi == 1.3.2
|
11 |
pydub
|
12 |
scipy
|
13 |
datetime
|
14 |
torch
|
15 |
torchvision
|
16 |
fluidsynth
|
17 |
+
pyFluidSynth
|