asigalov61 commited on
Commit
3fd4c9e
·
verified ·
1 Parent(s): f2f17a0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -1
app.py CHANGED
@@ -219,13 +219,26 @@ def generate_music_and_state(input_midi, num_prime_tokens, num_gen_tokens, num_m
219
  """
220
  print_sep()
221
  print("Request start time:", datetime.datetime.now(PDT).strftime("%Y-%m-%d %H:%M:%S"))
 
 
 
 
 
 
 
 
 
 
 
 
 
222
 
223
  # Load seed from MIDI if there is no existing composition.
224
  if not final_composition and input_midi is not None:
225
  final_composition = load_midi(input_midi)[:num_prime_tokens]
226
  midi_fname, song_events = save_midi(final_composition)
227
  # Use the last note's time as a marker.
228
- midi_score = TMIDIX.Tegridy_ms_SONG_to_MIDI_Converter(
229
  song_events,
230
  output_signature='Godzilla Piano Transformer',
231
  output_file_name=midi_fname,
 
219
  """
220
  print_sep()
221
  print("Request start time:", datetime.datetime.now(PDT).strftime("%Y-%m-%d %H:%M:%S"))
222
+
223
+ print('=' * 70)
224
+ if input_midi is not None:
225
+ fn = os.path.basename(input_midi.name)
226
+ fn1 = fn.split('.')[0]
227
+ print('Input file name:', fn)
228
+
229
+ print('Num prime tokens:', num_prime_tokens)
230
+ print('Num gen tokens:', num_gen_tokens)
231
+ print('Num mem tokens:', num_mem_tokens)
232
+
233
+ print('Model temp:', model_temperature)
234
+ print('=' * 70)
235
 
236
  # Load seed from MIDI if there is no existing composition.
237
  if not final_composition and input_midi is not None:
238
  final_composition = load_midi(input_midi)[:num_prime_tokens]
239
  midi_fname, song_events = save_midi(final_composition)
240
  # Use the last note's time as a marker.
241
+ TMIDIX.Tegridy_ms_SONG_to_MIDI_Converter(
242
  song_events,
243
  output_signature='Godzilla Piano Transformer',
244
  output_file_name=midi_fname,