Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,12 @@ from datasets import load_dataset
|
|
4 |
from fortepyan import MidiPiece
|
5 |
|
6 |
dataset = load_dataset("epr-labs/maestro-sustain-v2", split="train")
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
streamlit_pianoroll.from_fortepyan(piece[:500])
|
|
|
4 |
from fortepyan import MidiPiece
|
5 |
|
6 |
dataset = load_dataset("epr-labs/maestro-sustain-v2", split="train")
|
7 |
+
idx = st.number_input(
|
8 |
+
label="Piece IDX",
|
9 |
+
min_value=0,
|
10 |
+
max_value=len(dataset) - 1,
|
11 |
+
value=420,
|
12 |
+
)
|
13 |
+
piece = MidiPiece.from_huggingface(dataset[idx])
|
14 |
|
15 |
streamlit_pianoroll.from_fortepyan(piece[:500])
|