asigalov61 commited on
Commit
8c43bea
1 Parent(s): c12a6f7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -139,10 +139,10 @@ def find_midi(title, artist):
139
  plt.xlabel("Time in MIDI ticks")
140
  plt.ylabel("MIDI Pitch")
141
 
142
- with open(f"MIDI-Match-Sample.mid", 'wb') as f:
143
  f.write(MIDI.score2midi([1000, song_f]))
144
  audio = synthesis(MIDI.score2opus([1000, song_f]), soundfont_path)
145
- yield AUX_DATA[search_index][0], "MIDI-Match-Sample.mid", (44100, audio), plt
146
 
147
  #==========================================================================================================
148
 
@@ -165,20 +165,20 @@ if __name__ == "__main__":
165
  app = gr.Blocks()
166
  with app:
167
  gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>MIDI Search</h1>")
168
- gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Upload any MIDI file to find its closest match</h1>")
169
 
170
- gr.Markdown("![Visitors](https://api.visitorbadge.io/api/visitors?path=asigalov61.MIDI-Match&style=flat)\n\n"
171
- "Los Angeles MIDI Dataset Search and Explore Demo\n\n"
172
- "Please see [Los Angeles MIDI Dataset](https://github.com/asigalov61/Los-Angeles-MIDI-Dataset) for more information and features\n\n"
173
  "[Open In Colab]"
174
- "(https://colab.research.google.com/github/asigalov61/Los-Angeles-MIDI-Dataset/blob/main/Los_Angeles_MIDI_Dataset_Search_and_Explore.ipynb)"
175
- " for faster execution"
176
  )
177
 
178
  gr.Markdown("# Upload MIDI")
179
 
180
- title = gr.Textbox()
181
- artist = gr.Textbox()
182
  submit = gr.Button()
183
 
184
  gr.Markdown("# Match results")
 
139
  plt.xlabel("Time in MIDI ticks")
140
  plt.ylabel("MIDI Pitch")
141
 
142
+ with open(f"MIDI-Search-Sample.mid", 'wb') as f:
143
  f.write(MIDI.score2midi([1000, song_f]))
144
  audio = synthesis(MIDI.score2opus([1000, song_f]), soundfont_path)
145
+ yield AUX_DATA[search_index][0], "MIDI-Search-Sample.mid", (44100, audio), plt
146
 
147
  #==========================================================================================================
148
 
 
165
  app = gr.Blocks()
166
  with app:
167
  gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>MIDI Search</h1>")
168
+ gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Search and explore 160k+ MIDI titles</h1>")
169
 
170
+ gr.Markdown("![Visitors](https://api.visitorbadge.io/api/visitors?path=asigalov61.MIDI-Search&style=flat)\n\n"
171
+ "Giant Music Transformer Aux Data Demo\n\n"
172
+ "Please see [Giant Music Transformer](https://github.com/asigalov61/Giant-Music-Transformer) for more information and features\n\n"
173
  "[Open In Colab]"
174
+ "(https://colab.research.google.com/github/asigalov61/Giant-Music-Transformer/blob/main/Giant_Music_Transformer_TTM.ipynb)"
175
+ " for all features"
176
  )
177
 
178
  gr.Markdown("# Upload MIDI")
179
 
180
+ title = gr.Textbox(label="Desired Song Title", value="Family Guy")
181
+ artist = gr.Textbox(label="Desired Song Artist", value="TV Themes")
182
  submit = gr.Button()
183
 
184
  gr.Markdown("# Match results")