Spaces:
Running
on
Zero
Running
on
Zero
asigalov61
commited on
Commit
•
673739f
1
Parent(s):
d7ab2ca
Update app.py
Browse files
app.py
CHANGED
@@ -326,7 +326,9 @@ def generate_callback(input_midi,
|
|
326 |
|
327 |
if not final_composition and input_midi is not None:
|
328 |
final_composition.extend(load_midi(input_midi)[:num_prime_tokens])
|
329 |
-
|
|
|
|
|
330 |
batched_gen_tokens = generate_music(final_composition,
|
331 |
num_gen_tokens,
|
332 |
NUM_OUT_BATCHES,
|
@@ -427,10 +429,6 @@ def generate_callback_wrapper(input_midi,
|
|
427 |
#==================================================================================
|
428 |
|
429 |
def add_batch(batch_number):
|
430 |
-
|
431 |
-
if not block_lines:
|
432 |
-
midi_score = save_midi(final_composition)
|
433 |
-
block_lines.append(midi_score[-1][1] / 1000)
|
434 |
|
435 |
final_composition.extend(generated_batches[batch_number])
|
436 |
|
|
|
326 |
|
327 |
if not final_composition and input_midi is not None:
|
328 |
final_composition.extend(load_midi(input_midi)[:num_prime_tokens])
|
329 |
+
midi_score = save_midi(final_composition)
|
330 |
+
block_lines.append(midi_score[-1][1] / 1000)
|
331 |
+
|
332 |
batched_gen_tokens = generate_music(final_composition,
|
333 |
num_gen_tokens,
|
334 |
NUM_OUT_BATCHES,
|
|
|
429 |
#==================================================================================
|
430 |
|
431 |
def add_batch(batch_number):
|
|
|
|
|
|
|
|
|
432 |
|
433 |
final_composition.extend(generated_batches[batch_number])
|
434 |
|