asigalov61 commited on
Commit
4449b73
1 Parent(s): 7481c03

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +31 -4
app.py CHANGED
@@ -177,13 +177,40 @@ def find_midi(title, artist):
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
 
183
- print('Loading meta-data...')
184
- with open(meta_data_path, 'rb') as f:
185
- AUX_DATA = pickle.load(f)
186
  print('Done!')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
187
 
188
  app = gr.Blocks()
189
 
 
177
 
178
  if __name__ == "__main__":
179
 
180
+ PDT = timezone('US/Pacific')
181
+
182
+ print('=' * 70)
183
+ print('App start time: {:%Y-%m-%d %H:%M:%S}'.format(datetime.datetime.now(PDT)))
184
+ print('=' * 70)
185
+
186
  soundfont_path = "SGM-v2.01-YamahaGrand-Guit-Bass-v2.7.sf2"
187
+ print('Loading files list...')
188
+
189
+ all_MIDI_files_names = TMIDIX.Tegridy_Any_Pickle_File_Reader('all_MIDI_files_names')
190
 
 
 
 
191
  print('Done!')
192
+ print('=' * 70)
193
+
194
+ print('Loading clean_midi corpus...')
195
+
196
+ clean_midi_artist_song_description_summaries_lyrics_score = TMIDIX.Tegridy_Any_Pickle_File_Reader('clean_midi_artist_song_description_summaries_lyrics_scores')
197
+
198
+ print('Done!')
199
+ print('=' * 70)
200
+
201
+ print('Loading MIDI corpus embeddings...')
202
+
203
+ corpus_embeddings = np.load('MIDI_corpus_embeddings_all-mpnet-base-v2.npz')['data']
204
+
205
+ print('Done!')
206
+ print('=' * 70)
207
+
208
+ print('Loading Sentence Transformer model...')
209
+
210
+ model = SentenceTransformer('all-mpnet-base-v2')
211
+
212
+ print('Done!')
213
+ print('=' * 70)
214
 
215
  app = gr.Blocks()
216