Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -391,12 +391,14 @@ def Generate_Accompaniment(input_midi,
|
|
| 391 |
score = sorted(mel + acc, key=lambda x: x[1])
|
| 392 |
good_scores.append(score)
|
| 393 |
|
|
|
|
| 394 |
|
| 395 |
if len(good_scores) > 0:
|
| 396 |
final_score = random.choice(good_scores)
|
| 397 |
|
| 398 |
else:
|
| 399 |
-
|
|
|
|
| 400 |
|
| 401 |
print('Done!')
|
| 402 |
print('=' * 70)
|
|
|
|
| 391 |
score = sorted(mel + acc, key=lambda x: x[1])
|
| 392 |
good_scores.append(score)
|
| 393 |
|
| 394 |
+
print('Number of good scores:', len(good_scores))
|
| 395 |
|
| 396 |
if len(good_scores) > 0:
|
| 397 |
final_score = random.choice(good_scores)
|
| 398 |
|
| 399 |
else:
|
| 400 |
+
mel, acc = tokens_to_scores(random.choice(output), score_len)
|
| 401 |
+
final_score = sorted(mel + acc, key=lambda x: x[1])
|
| 402 |
|
| 403 |
print('Done!')
|
| 404 |
print('=' * 70)
|