asigalov61
commited on
Commit
•
77c722a
1
Parent(s):
d3192fa
Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ import matplotlib.pyplot as plt
|
|
29 |
|
30 |
#==========================================================================================================
|
31 |
|
32 |
-
def find_midi(
|
33 |
|
34 |
print('=' * 70)
|
35 |
print('Req start time: {:%Y-%m-%d %H:%M:%S}'.format(datetime.datetime.now(PDT)))
|
@@ -171,7 +171,7 @@ def find_midi(title, artist):
|
|
171 |
output_score, patches, overflow_patches = TMIDIX.patch_enhanced_score_notes(song_f)
|
172 |
|
173 |
detailed_stats = TMIDIX.Tegridy_ms_SONG_to_MIDI_Converter(output_score,
|
174 |
-
output_signature = '
|
175 |
output_file_name = song_artist_title,
|
176 |
track_name='Project Los Angeles',
|
177 |
list_of_MIDI_patches=patches
|
@@ -256,12 +256,11 @@ if __name__ == "__main__":
|
|
256 |
"Check out [MidiCaps Dataset](https://huggingface.co/datasets/amaai-lab/MidiCaps) on Hugging Face!\n\n"
|
257 |
)
|
258 |
|
259 |
-
gr.Markdown("# Enter any desired
|
260 |
|
261 |
-
|
262 |
-
artist = gr.Textbox(label="Song Artist", value="TV Themes")
|
263 |
submit = gr.Button(value='Search')
|
264 |
-
gr.ClearButton(components=[
|
265 |
|
266 |
gr.Markdown("# Search results")
|
267 |
|
@@ -271,7 +270,7 @@ if __name__ == "__main__":
|
|
271 |
output_plot = gr.Plot(label="Output MIDI score plot")
|
272 |
output_midi = gr.File(label="Output MIDI file", file_types=[".mid"])
|
273 |
|
274 |
-
run_event = submit.click(find_midi, [
|
275 |
[output_midi_title, output_midi_summary, output_midi, output_audio, output_plot ])
|
276 |
|
277 |
app.launch()
|
|
|
29 |
|
30 |
#==========================================================================================================
|
31 |
|
32 |
+
def find_midi(input_search_string):
|
33 |
|
34 |
print('=' * 70)
|
35 |
print('Req start time: {:%Y-%m-%d %H:%M:%S}'.format(datetime.datetime.now(PDT)))
|
|
|
171 |
output_score, patches, overflow_patches = TMIDIX.patch_enhanced_score_notes(song_f)
|
172 |
|
173 |
detailed_stats = TMIDIX.Tegridy_ms_SONG_to_MIDI_Converter(output_score,
|
174 |
+
output_signature = 'LAKH MIDI Dataset Search',
|
175 |
output_file_name = song_artist_title,
|
176 |
track_name='Project Los Angeles',
|
177 |
list_of_MIDI_patches=patches
|
|
|
256 |
"Check out [MidiCaps Dataset](https://huggingface.co/datasets/amaai-lab/MidiCaps) on Hugging Face!\n\n"
|
257 |
)
|
258 |
|
259 |
+
gr.Markdown("# Enter any desired song description\n\n")
|
260 |
|
261 |
+
input_search_string = gr.Textbox(label="Search string", value="Cheery pop song about love and happiness")
|
|
|
262 |
submit = gr.Button(value='Search')
|
263 |
+
gr.ClearButton(components=[input_search_string])
|
264 |
|
265 |
gr.Markdown("# Search results")
|
266 |
|
|
|
270 |
output_plot = gr.Plot(label="Output MIDI score plot")
|
271 |
output_midi = gr.File(label="Output MIDI file", file_types=[".mid"])
|
272 |
|
273 |
+
run_event = submit.click(find_midi, [input_search_string],
|
274 |
[output_midi_title, output_midi_summary, output_midi, output_audio, output_plot ])
|
275 |
|
276 |
app.launch()
|