Spaces:
Running
Running
asigalov61
commited on
Commit
•
29090fa
1
Parent(s):
5efa190
Update app.py
Browse files
app.py
CHANGED
@@ -11,6 +11,8 @@ import json
|
|
11 |
import MIDI
|
12 |
from midi_synthesizer import synthesis
|
13 |
|
|
|
|
|
14 |
import copy
|
15 |
from collections import Counter
|
16 |
import random
|
@@ -401,16 +403,16 @@ if __name__ == "__main__":
|
|
401 |
opt = parser.parse_args()
|
402 |
|
403 |
soundfont_path = "SGM-v2.01-YamahaGrand-Guit-Bass-v2.7.sf2"
|
404 |
-
meta_data_path = "
|
405 |
|
406 |
print('Loading meta-data...')
|
407 |
with open(meta_data_path, 'rb') as f:
|
408 |
-
|
409 |
print('Done!')
|
410 |
|
411 |
app = gr.Blocks()
|
412 |
with app:
|
413 |
-
gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>MIDI
|
414 |
gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Upload any MIDI file to find its closest match</h1>")
|
415 |
|
416 |
gr.Markdown("![Visitors](https://api.visitorbadge.io/api/visitors?path=asigalov61.MIDI-Match&style=flat)\n\n"
|
|
|
11 |
import MIDI
|
12 |
from midi_synthesizer import synthesis
|
13 |
|
14 |
+
from fuzzywuzzy import process
|
15 |
+
|
16 |
import copy
|
17 |
from collections import Counter
|
18 |
import random
|
|
|
403 |
opt = parser.parse_args()
|
404 |
|
405 |
soundfont_path = "SGM-v2.01-YamahaGrand-Guit-Bass-v2.7.sf2"
|
406 |
+
meta_data_path = "Giant_Music_Transformer_Aux_Data.pickle"
|
407 |
|
408 |
print('Loading meta-data...')
|
409 |
with open(meta_data_path, 'rb') as f:
|
410 |
+
AUX_DATA = pickle.load(f)
|
411 |
print('Done!')
|
412 |
|
413 |
app = gr.Blocks()
|
414 |
with app:
|
415 |
+
gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>MIDI Search</h1>")
|
416 |
gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Upload any MIDI file to find its closest match</h1>")
|
417 |
|
418 |
gr.Markdown("![Visitors](https://api.visitorbadge.io/api/visitors?path=asigalov61.MIDI-Match&style=flat)\n\n"
|