Spaces:
Running
on
Zero
Running
on
Zero
asigalov61
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -214,10 +214,10 @@ def InpaintPitches(input_midi, input_num_of_notes, input_patch_number):
|
|
214 |
|
215 |
#@markdown Generation settings
|
216 |
|
217 |
-
number_of_prime_tokens =
|
218 |
number_of_memory_tokens = 1024 # @param {type:"slider", min:3, max:8190, step:3}
|
219 |
number_of_samples_per_inpainted_note = 1 #@param {type:"slider", min:1, max:16, step:1}
|
220 |
-
temperature = 0.
|
221 |
|
222 |
print('=' * 70)
|
223 |
print('Giant Music Transformer Inpainting Model Generator')
|
@@ -232,10 +232,11 @@ def InpaintPitches(input_midi, input_num_of_notes, input_patch_number):
|
|
232 |
if 2304 <= melody_chords[i] < 18945 and (cpatch) == inpaint_MIDI_patch:
|
233 |
nidx += 1
|
234 |
|
235 |
-
if nidx == input_num_of_notes:
|
236 |
-
nidx = i
|
237 |
break
|
238 |
-
|
|
|
|
|
239 |
out2 = []
|
240 |
|
241 |
for m in melody_chords[:number_of_prime_tokens]:
|
|
|
214 |
|
215 |
#@markdown Generation settings
|
216 |
|
217 |
+
number_of_prime_tokens = 90 # @param {type:"slider", min:3, max:8190, step:3}
|
218 |
number_of_memory_tokens = 1024 # @param {type:"slider", min:3, max:8190, step:3}
|
219 |
number_of_samples_per_inpainted_note = 1 #@param {type:"slider", min:1, max:16, step:1}
|
220 |
+
temperature = 0.85
|
221 |
|
222 |
print('=' * 70)
|
223 |
print('Giant Music Transformer Inpainting Model Generator')
|
|
|
232 |
if 2304 <= melody_chords[i] < 18945 and (cpatch) == inpaint_MIDI_patch:
|
233 |
nidx += 1
|
234 |
|
235 |
+
if nidx == input_num_of_notes+(number_of_prime_tokens // 3):
|
|
|
236 |
break
|
237 |
+
|
238 |
+
nidx = i
|
239 |
+
|
240 |
out2 = []
|
241 |
|
242 |
for m in melody_chords[:number_of_prime_tokens]:
|