Spaces:
Running
on
Zero
Running
on
Zero
asigalov61
commited on
Commit
•
45a3f32
1
Parent(s):
28d2673
Update app.py
Browse files
app.py
CHANGED
@@ -202,12 +202,6 @@ def InpaintPitches(input_midi, input_num_of_notes, input_patch_number):
|
|
202 |
print('=' * 70)
|
203 |
print('Generating...')
|
204 |
|
205 |
-
output = []
|
206 |
-
|
207 |
-
max_chords_limit = 8
|
208 |
-
temperature=0.9
|
209 |
-
num_memory_tokens=4096
|
210 |
-
|
211 |
#@title Pitches/Instruments Inpainting
|
212 |
|
213 |
#@markdown You can stop the inpainting at any time to render partial results
|
@@ -220,8 +214,8 @@ def InpaintPitches(input_midi, input_num_of_notes, input_patch_number):
|
|
220 |
|
221 |
#@markdown Generation settings
|
222 |
|
223 |
-
number_of_prime_tokens =
|
224 |
-
number_of_memory_tokens =
|
225 |
number_of_samples_per_inpainted_note = 1 #@param {type:"slider", min:1, max:16, step:1}
|
226 |
|
227 |
print('=' * 70)
|
@@ -233,7 +227,7 @@ def InpaintPitches(input_midi, input_num_of_notes, input_patch_number):
|
|
233 |
for m in melody_chords[:number_of_prime_tokens]:
|
234 |
out2.append(m)
|
235 |
|
236 |
-
for i in range(number_of_prime_tokens, len(melody_chords)):
|
237 |
|
238 |
cpatch = (melody_chords[i]-2304) // 129
|
239 |
|
|
|
202 |
print('=' * 70)
|
203 |
print('Generating...')
|
204 |
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
#@title Pitches/Instruments Inpainting
|
206 |
|
207 |
#@markdown You can stop the inpainting at any time to render partial results
|
|
|
214 |
|
215 |
#@markdown Generation settings
|
216 |
|
217 |
+
number_of_prime_tokens = 30 # @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 |
|
221 |
print('=' * 70)
|
|
|
227 |
for m in melody_chords[:number_of_prime_tokens]:
|
228 |
out2.append(m)
|
229 |
|
230 |
+
for i in range(number_of_prime_tokens, len(melody_chords[:input_num_of_notes])):
|
231 |
|
232 |
cpatch = (melody_chords[i]-2304) // 129
|
233 |
|