asigalov61 commited on
Commit
3fa5312
1 Parent(s): 053ba8a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -9
app.py CHANGED
@@ -10,7 +10,9 @@ import numpy as np
10
 
11
  import gradio as gr
12
 
 
13
  import random
 
14
 
15
  import zlib
16
 
@@ -174,15 +176,7 @@ def find_midi(title, artist):
174
  #==========================================================================================================
175
 
176
  if __name__ == "__main__":
177
- parser = ArgumentParser()
178
- parser.add_argument("--share", action="store_true", default=False, help="share gradio app")
179
- parser.add_argument("--port", type=int, default=7860, help="gradio server port")
180
- parser.add_argument("--max-gen", type=int, default=1024, help="max generation steps")
181
-
182
- opt = parser.parse_args()
183
-
184
 
185
-
186
  soundfont_path = "SGM-v2.01-YamahaGrand-Guit-Bass-v2.7.sf2"
187
  meta_data_path = "Giant_Music_Transformer_Aux_Data.pickle"
188
 
@@ -192,6 +186,7 @@ if __name__ == "__main__":
192
  print('Done!')
193
 
194
  app = gr.Blocks()
 
195
  with app:
196
  gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Advanced MIDI Search</h1>")
197
  gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Search and explore 179k+ MIDI titles</h1>")
@@ -218,4 +213,4 @@ if __name__ == "__main__":
218
  run_event = submit.click(find_midi, [title, artist],
219
  [output_midi_seq, output_midi, output_audio, output_plot])
220
 
221
- app.queue(1).launch(server_port=opt.port, share=opt.share, inbrowser=True)
 
10
 
11
  import gradio as gr
12
 
13
+ import copy
14
  import random
15
+ import pickle
16
 
17
  import zlib
18
 
 
176
  #==========================================================================================================
177
 
178
  if __name__ == "__main__":
 
 
 
 
 
 
 
179
 
 
180
  soundfont_path = "SGM-v2.01-YamahaGrand-Guit-Bass-v2.7.sf2"
181
  meta_data_path = "Giant_Music_Transformer_Aux_Data.pickle"
182
 
 
186
  print('Done!')
187
 
188
  app = gr.Blocks()
189
+
190
  with app:
191
  gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Advanced MIDI Search</h1>")
192
  gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Search and explore 179k+ MIDI titles</h1>")
 
213
  run_event = submit.click(find_midi, [title, artist],
214
  [output_midi_seq, output_midi, output_audio, output_plot])
215
 
216
+ app.launch()