juancopi81 commited on
Commit
9875faf
1 Parent(s): 871dc23

Add sheet music visualization

Browse files
Files changed (2) hide show
  1. app.py +6 -5
  2. packages.txt +1 -1
app.py CHANGED
@@ -74,8 +74,8 @@ def inference(yt_audio_path):
74
  piano_roll = create_image_from_note_sequence(est_ns)
75
 
76
  parsed = converter.parse("./transcribed.mid")
77
- # score = parsed.write("musicxml.png")
78
- return "./transcribed.mid", (SAMPLE_RATE, int16_data), piano_roll, piano_roll
79
 
80
  title = "Transcribe music from YouTube videos using Transformers."
81
  description = """
@@ -119,9 +119,10 @@ with demo:
119
  yt_audio = gr.Audio()
120
  yt_audio_path = gr.Textbox(visible=False)
121
 
122
- preview_btn.click(fn=populate_metadata,
123
- inputs=[link, start_second],
124
- outputs=[img, title, yt_audio, yt_audio_path])
 
125
 
126
  with gr.Row():
127
  btn = gr.Button("Transcribe music")
 
74
  piano_roll = create_image_from_note_sequence(est_ns)
75
 
76
  parsed = converter.parse("./transcribed.mid")
77
+ score = parsed.write("lily.png")
78
+ return "./transcribed.mid", (SAMPLE_RATE, int16_data), piano_roll, score
79
 
80
  title = "Transcribe music from YouTube videos using Transformers."
81
  description = """
 
119
  yt_audio = gr.Audio()
120
  yt_audio_path = gr.Textbox(visible=False)
121
 
122
+ with gr.Row():
123
+ preview_btn.click(fn=populate_metadata,
124
+ inputs=[link, start_second],
125
+ outputs=[img, title, yt_audio, yt_audio_path])
126
 
127
  with gr.Row():
128
  btn = gr.Button("Transcribe music")
packages.txt CHANGED
@@ -2,4 +2,4 @@ libfluidsynth2
2
  build-essential
3
  libasound2-dev
4
  libjack-dev
5
- musescore3
 
2
  build-essential
3
  libasound2-dev
4
  libjack-dev
5
+ lilypond