roszcz commited on
Commit
51f2390
·
verified ·
1 Parent(s): 1c832d9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
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
- piece = MidiPiece.from_huggingface(dataset[312])
 
 
 
 
 
 
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])