Update app.py
Browse files
app.py
CHANGED
|
@@ -109,7 +109,17 @@ def ID_MIDI(input_midi):
|
|
| 109 |
|
| 110 |
output_midi_src_dataset = 'unknown'
|
| 111 |
output_midi_path_str = 'none'
|
| 112 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
|
| 114 |
if new_midi_md5hash in midid_md5_hashes:
|
| 115 |
|
|
@@ -196,6 +206,13 @@ if __name__ == "__main__":
|
|
| 196 |
print('Done!')
|
| 197 |
print('=' * 70)
|
| 198 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 199 |
app = gr.Blocks()
|
| 200 |
|
| 201 |
with app:
|
|
|
|
| 109 |
|
| 110 |
output_midi_src_dataset = 'unknown'
|
| 111 |
output_midi_path_str = 'none'
|
| 112 |
+
|
| 113 |
+
if new_midi_md5hash in monster_midi_titles:
|
| 114 |
+
title = monster_midi_titles[new_midi_md5hash].split(' --- ')
|
| 115 |
+
|
| 116 |
+
song = title[0]
|
| 117 |
+
artist = title[1]
|
| 118 |
+
|
| 119 |
+
song_description = TMIDIX.escore_notes_to_text_description(escore_notes, song_name=song, artist_name=artist)
|
| 120 |
+
|
| 121 |
+
else:
|
| 122 |
+
song_description = TMIDIX.escore_notes_to_text_description(escore_notes)
|
| 123 |
|
| 124 |
if new_midi_md5hash in midid_md5_hashes:
|
| 125 |
|
|
|
|
| 206 |
print('Done!')
|
| 207 |
print('=' * 70)
|
| 208 |
|
| 209 |
+
print('Loading Monster MIDI titles database...')
|
| 210 |
+
|
| 211 |
+
monster_midi_titles = TMIDIX.Tegridy_Any_Pickle_File_Reader('Monster_MIDI_Titles_Database_CC_BY_NC_SA.pickle')
|
| 212 |
+
|
| 213 |
+
print('Done!')
|
| 214 |
+
print('=' * 70)
|
| 215 |
+
|
| 216 |
app = gr.Blocks()
|
| 217 |
|
| 218 |
with app:
|