Spaces:
Running
Running
Commit
·
8c43bea
1
Parent(s):
c12a6f7
Update app.py
Browse files
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-
|
| 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-
|
| 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'>
|
| 169 |
|
| 170 |
-
gr.Markdown("
|
| 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("\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")
|