asigalov61 commited on
Commit
ea63137
1 Parent(s): df2f0e4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -20
app.py CHANGED
@@ -36,8 +36,11 @@ def ClassifyMIDI(input_midi):
36
  fn = os.path.basename(input_midi.name)
37
  fn1 = fn.split('.')[0]
38
 
39
- print('-' * 70)
40
- print('Input file name:', fn)
 
 
 
41
 
42
  print('=' * 70)
43
  print('Loading MIDI file...')
@@ -113,16 +116,8 @@ def ClassifyMIDI(input_midi):
113
 
114
  print('Done!')
115
  print('=' * 70)
116
- print('Composition has', notes_counter, 'notes')
117
- print('=' * 70)
118
-
119
- print('=' * 70)
120
- print('Ultimate MIDI Classifier')
121
- print('=' * 70)
122
 
123
- print('Input MIDI file name:', midi_name)
124
- print('=' * 70)
125
- print('Sampling score...')
126
 
127
  chunk_size = 1020
128
 
@@ -142,14 +137,10 @@ def ClassifyMIDI(input_midi):
142
  td.extend([938])
143
 
144
  input_data.append(td)
145
-
146
  print('Done!')
147
  print('=' * 70)
148
- print('Composition was split into' , len(input_data), 'samples', 'of 340 notes each with', 340 - chunk_size // classification_sampling_resolution // 3, 'notes overlap')
149
- print('=' * 70)
150
- print('Number of notes in all composition samples:', len(input_data) * 340)
151
- print('=' * 70)
152
-
153
  #==============================================================
154
 
155
  classification_summary_string = '=' * 70
@@ -157,13 +148,15 @@ def ClassifyMIDI(input_midi):
157
 
158
  print('Composition has', notes_counter, 'notes')
159
  print('=' * 70)
160
- print('Composition was split into' , len(input_data), 'chunks of 340 notes each with 255 notes overlap')
161
- print('Number of notes in all composition chunks:', len(input_data) * 340)
 
 
162
 
163
  classification_summary_string += 'Composition has ' + str(notes_counter) + ' notes\n'
164
  classification_summary_string += '=' * 70
165
  classification_summary_string += '\n'
166
- classification_summary_string += 'Composition was split into ' + str(len(input_data)) + ' chunks of 340 notes each with 170 notes overlap\n'
167
  classification_summary_string += 'Number of notes in all composition chunks: ' + str(len(input_data) * 340) + '\n'
168
  classification_summary_string += '=' * 70
169
  classification_summary_string += '\n'
 
36
  fn = os.path.basename(input_midi.name)
37
  fn1 = fn.split('.')[0]
38
 
39
+ print('=' * 70)
40
+ print('Ultimate MIDI Classifier')
41
+ print('=' * 70)
42
+
43
+ print('Input MIDI file name:', fn)
44
 
45
  print('=' * 70)
46
  print('Loading MIDI file...')
 
116
 
117
  print('Done!')
118
  print('=' * 70)
 
 
 
 
 
 
119
 
120
+ print('Sampling score...')
 
 
121
 
122
  chunk_size = 1020
123
 
 
137
  td.extend([938])
138
 
139
  input_data.append(td)
140
+
141
  print('Done!')
142
  print('=' * 70)
143
+
 
 
 
 
144
  #==============================================================
145
 
146
  classification_summary_string = '=' * 70
 
148
 
149
  print('Composition has', notes_counter, 'notes')
150
  print('=' * 70)
151
+ print('Composition was split into' , len(input_data), 'samples', 'of 340 notes each with', 340 - chunk_size // classification_sampling_resolution // 3, 'notes overlap')
152
+ print('=' * 70)
153
+ print('Number of notes in all composition samples:', len(input_data) * 340)
154
+ print('=' * 70)
155
 
156
  classification_summary_string += 'Composition has ' + str(notes_counter) + ' notes\n'
157
  classification_summary_string += '=' * 70
158
  classification_summary_string += '\n'
159
+ classification_summary_string += 'Composition was split into ' + 'samples', 'of 340 notes each with', 340 - chunk_size // classification_sampling_resolution // 3, 'notes overlap\n'
160
  classification_summary_string += 'Number of notes in all composition chunks: ' + str(len(input_data) * 340) + '\n'
161
  classification_summary_string += '=' * 70
162
  classification_summary_string += '\n'