asigalov61 commited on
Commit
7b0fbfe
1 Parent(s): 6c71f04

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -27,7 +27,8 @@ in_space = os.getenv("SYSTEM") == "spaces"
27
 
28
  @torch.no_grad()
29
  def GenerateMIDI(num_tok, idrums, iinstr):
30
- print('Req time: {:%Y-%m-%d %H:%M:%S}'.format(datetime.datetime.now(PDT)))
 
31
  start_time = time.time()
32
 
33
  print('-' * 70)
@@ -125,10 +126,13 @@ def GenerateMIDI(num_tok, idrums, iinstr):
125
 
126
  audio = synthesis(TMIDIX.score2opus(output), 'SGM-v2.01-YamahaGrand-Guit-Bass-v2.7.sf2')
127
 
128
- print('Sample output INTs', outy[:16])
 
 
 
 
129
  print('-' * 70)
130
  print('Req execution time:', (time.time() - start_time), 'sec')
131
- print('=' * 70)
132
 
133
  yield output, "Allegro-Music-Transformer-Music-Composition.mid", (44100, audio), [
134
  create_msg("visualizer_end", None)]
 
27
 
28
  @torch.no_grad()
29
  def GenerateMIDI(num_tok, idrums, iinstr):
30
+ print('=' * 70)
31
+ print('Req start time: {:%Y-%m-%d %H:%M:%S}'.format(datetime.datetime.now(PDT)))
32
  start_time = time.time()
33
 
34
  print('-' * 70)
 
126
 
127
  audio = synthesis(TMIDIX.score2opus(output), 'SGM-v2.01-YamahaGrand-Guit-Bass-v2.7.sf2')
128
 
129
+ print('Sample INTs', outy[:16])
130
+ print('-' * 70)
131
+ print('Last generated MIDI event', output[-1])
132
+ print('-' * 70)
133
+ print('Req end time: {:%Y-%m-%d %H:%M:%S}'.format(datetime.datetime.now(PDT)))
134
  print('-' * 70)
135
  print('Req execution time:', (time.time() - start_time), 'sec')
 
136
 
137
  yield output, "Allegro-Music-Transformer-Music-Composition.mid", (44100, audio), [
138
  create_msg("visualizer_end", None)]