import streamlit as st import streamlit_pianoroll from fortepyan import MidiPiece from datasets import load_dataset def main(): dataset = load_dataset("epr-labs/pijamia-midi-v1", split="train") record_idx = st.number_input( label="record id", min_value=0, max_value=len(dataset) - 1, value=0, ) record = dataset[record_idx] piece = MidiPiece.from_huggingface(record) streamlit_pianoroll.from_fortepyan(piece) if __name__ == "__main__": main()