asigalov61
commited on
Commit
•
94706c2
1
Parent(s):
01094e0
Update app.py
Browse files
app.py
CHANGED
@@ -146,7 +146,7 @@ def GenerateMIDI():
|
|
146 |
def cancel_run(output):
|
147 |
if output is None:
|
148 |
return None, None
|
149 |
-
with open(f"
|
150 |
f.write(TMIDIX.score2midi(output))
|
151 |
audio = synthesis(TMIDIX.score2opus(output), 'SGM-v2.01-YamahaGrand-Guit-Bass-v2.7.sf2')
|
152 |
return "Allegro-Music-Transformer-Music-Composition.mid", (44100, audio), [create_msg("visualizer_end", None)]
|
|
|
146 |
def cancel_run(output):
|
147 |
if output is None:
|
148 |
return None, None
|
149 |
+
with open(f"Allegro-Music-Transformer-Music-Composition.mid", 'wb') as f:
|
150 |
f.write(TMIDIX.score2midi(output))
|
151 |
audio = synthesis(TMIDIX.score2opus(output), 'SGM-v2.01-YamahaGrand-Guit-Bass-v2.7.sf2')
|
152 |
return "Allegro-Music-Transformer-Music-Composition.mid", (44100, audio), [create_msg("visualizer_end", None)]
|