roszcz commited on
Commit
ba969e8
1 Parent(s): fabcff4

show piece source

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -17,8 +17,14 @@ def main():
17
 
18
  record = dataset[record_idx]
19
  piece = MidiPiece.from_huggingface(record)
 
 
 
20
  streamlit_pianoroll.from_fortepyan(piece)
21
 
 
 
 
22
 
23
  if __name__ == "__main__":
24
  main()
 
17
 
18
  record = dataset[record_idx]
19
  piece = MidiPiece.from_huggingface(record)
20
+ # TODO Improve fortepyan to make this cleaner
21
+ piece.time_shift(-piece.df.start.min())
22
+
23
  streamlit_pianoroll.from_fortepyan(piece)
24
 
25
+ st.write("#### Piece metadata")
26
+ st.json(piece.source)
27
+
28
 
29
  if __name__ == "__main__":
30
  main()