refactor generate_ai_midi function to reduce default number of notes from 40 to 20
Browse files
main.py
CHANGED
|
@@ -76,7 +76,7 @@ model.eval() # Chuyα»n sang chαΊΏ Δα» suy luαΊn
|
|
| 76 |
with open('notes_corpus.pkl', 'rb') as f:
|
| 77 |
corpus = pickle.load(f)
|
| 78 |
|
| 79 |
-
def generate_ai_midi(bpm: int, output_file: str, num_notes: int =
|
| 80 |
temperature = max(0.5, min(1.1, 0.6 + (bpm - 60) / 100))
|
| 81 |
|
| 82 |
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
|
|
| 76 |
with open('notes_corpus.pkl', 'rb') as f:
|
| 77 |
corpus = pickle.load(f)
|
| 78 |
|
| 79 |
+
def generate_ai_midi(bpm: int, output_file: str, num_notes: int = 20):
|
| 80 |
temperature = max(0.5, min(1.1, 0.6 + (bpm - 60) / 100))
|
| 81 |
|
| 82 |
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|