asigalov61
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -12,6 +12,7 @@ import gradio as gr
|
|
12 |
|
13 |
from x_transformer_1_23_2 import *
|
14 |
import random
|
|
|
15 |
import tqdm
|
16 |
|
17 |
from midi_to_colab_audio import midi_to_colab_audio
|
@@ -197,8 +198,6 @@ def ClassifyMIDI(input_midi):
|
|
197 |
for i, a in enumerate(all_results_labels):
|
198 |
print('Notes', i*170, '-', (i*170)+340, '===', a)
|
199 |
|
200 |
-
print('=' * 70)
|
201 |
-
|
202 |
print('=' * 70)
|
203 |
print('Done!')
|
204 |
print('=' * 70)
|
@@ -271,11 +270,13 @@ if __name__ == "__main__":
|
|
271 |
soundfont = "SGM-v2.01-YamahaGrand-Guit-Bass-v2.7.sf2"
|
272 |
|
273 |
print('Loading Annotated MIDI Dataset processed scores...')
|
274 |
-
|
|
|
275 |
print('=' * 70)
|
276 |
|
277 |
print('Loading Annotated MIDI Dataset Classifier Songs Artists Labels...')
|
278 |
-
|
|
|
279 |
print('=' * 70)
|
280 |
|
281 |
app = gr.Blocks()
|
@@ -287,7 +288,7 @@ if __name__ == "__main__":
|
|
287 |
|
288 |
input_midi = gr.File(label="Input MIDI", file_types=[".midi", ".mid", ".kar"])
|
289 |
|
290 |
-
run_btn = gr.Button("
|
291 |
|
292 |
gr.Markdown("## Classification results")
|
293 |
|
|
|
12 |
|
13 |
from x_transformer_1_23_2 import *
|
14 |
import random
|
15 |
+
import statistics
|
16 |
import tqdm
|
17 |
|
18 |
from midi_to_colab_audio import midi_to_colab_audio
|
|
|
198 |
for i, a in enumerate(all_results_labels):
|
199 |
print('Notes', i*170, '-', (i*170)+340, '===', a)
|
200 |
|
|
|
|
|
201 |
print('=' * 70)
|
202 |
print('Done!')
|
203 |
print('=' * 70)
|
|
|
270 |
soundfont = "SGM-v2.01-YamahaGrand-Guit-Bass-v2.7.sf2"
|
271 |
|
272 |
print('Loading Annotated MIDI Dataset processed scores...')
|
273 |
+
processed_scores = TMIDIX.Tegridy_Any_Pickle_File_Reader('processed_scores')
|
274 |
+
print(processed_scores[0][0])
|
275 |
print('=' * 70)
|
276 |
|
277 |
print('Loading Annotated MIDI Dataset Classifier Songs Artists Labels...')
|
278 |
+
classifier_labels = TMIDIX.Tegridy_Any_Pickle_File_Reader('Annotated_MIDI_Dataset_Classifier_Songs_Artists_Labels')
|
279 |
+
print(classifier_labels[0])
|
280 |
print('=' * 70)
|
281 |
|
282 |
app = gr.Blocks()
|
|
|
288 |
|
289 |
input_midi = gr.File(label="Input MIDI", file_types=[".midi", ".mid", ".kar"])
|
290 |
|
291 |
+
run_btn = gr.Button("classify", variant="primary")
|
292 |
|
293 |
gr.Markdown("## Classification results")
|
294 |
|