Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
6f88bb6
1
Parent(s):
aad9254
Update app.py
Browse files
app.py
CHANGED
|
@@ -151,6 +151,7 @@ def GenerateMIDI(num_tok, idrums, iinstr, progress=gr.Progress()):
|
|
| 151 |
y.append(s[4])
|
| 152 |
c.append(colors[s[3]])
|
| 153 |
|
|
|
|
| 154 |
plt.figure(figsize=(14,5))
|
| 155 |
ax=plt.axes(title='Allegro Music Transformer Composition')
|
| 156 |
ax.set_facecolor('black')
|
|
@@ -158,8 +159,7 @@ def GenerateMIDI(num_tok, idrums, iinstr, progress=gr.Progress()):
|
|
| 158 |
plt.scatter(x,y, c=c)
|
| 159 |
plt.xlabel("Time")
|
| 160 |
plt.ylabel("Pitch")
|
| 161 |
-
|
| 162 |
-
|
| 163 |
yield [500, output1], plt, "Allegro-Music-Transformer-Music-Composition.mid", (44100, audio)
|
| 164 |
|
| 165 |
#=================================================================================================
|
|
|
|
| 151 |
y.append(s[4])
|
| 152 |
c.append(colors[s[3]])
|
| 153 |
|
| 154 |
+
plt.close()
|
| 155 |
plt.figure(figsize=(14,5))
|
| 156 |
ax=plt.axes(title='Allegro Music Transformer Composition')
|
| 157 |
ax.set_facecolor('black')
|
|
|
|
| 159 |
plt.scatter(x,y, c=c)
|
| 160 |
plt.xlabel("Time")
|
| 161 |
plt.ylabel("Pitch")
|
| 162 |
+
|
|
|
|
| 163 |
yield [500, output1], plt, "Allegro-Music-Transformer-Music-Composition.mid", (44100, audio)
|
| 164 |
|
| 165 |
#=================================================================================================
|