Spaces:
Runtime error
Runtime error
fix examples
Browse files
app.py
CHANGED
|
@@ -40,7 +40,7 @@ def predict(
|
|
| 40 |
topk = int(topk)
|
| 41 |
if MODEL is None:
|
| 42 |
MODEL = load_model("melody")
|
| 43 |
-
|
| 44 |
if melody_input is None:
|
| 45 |
raise gr.Error("Please upload a melody to continue!")
|
| 46 |
|
|
@@ -276,22 +276,40 @@ def ui(**kwargs):
|
|
| 276 |
[
|
| 277 |
"An 80s driving pop song with heavy drums and synth pads in the background",
|
| 278 |
"./assets/bach.mp3",
|
|
|
|
|
|
|
|
|
|
| 279 |
],
|
| 280 |
[
|
| 281 |
"A cheerful country song with acoustic guitars",
|
| 282 |
"./assets/bolero_ravel.mp3",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 283 |
],
|
| 284 |
-
["90s rock song with electric guitar and heavy drums", None],
|
| 285 |
[
|
| 286 |
"a light and cheerly EDM track, with syncopated drums, aery pads, and strong emotions",
|
| 287 |
"./assets/bach.mp3",
|
|
|
|
|
|
|
|
|
|
| 288 |
],
|
| 289 |
[
|
| 290 |
"lofi slow bpm electro chill with organic samples",
|
| 291 |
-
|
|
|
|
|
|
|
|
|
|
| 292 |
],
|
| 293 |
],
|
| 294 |
-
inputs=[text, melody],
|
| 295 |
outputs=[output],
|
| 296 |
)
|
| 297 |
gr.Markdown(
|
|
|
|
| 40 |
topk = int(topk)
|
| 41 |
if MODEL is None:
|
| 42 |
MODEL = load_model("melody")
|
| 43 |
+
|
| 44 |
if melody_input is None:
|
| 45 |
raise gr.Error("Please upload a melody to continue!")
|
| 46 |
|
|
|
|
| 276 |
[
|
| 277 |
"An 80s driving pop song with heavy drums and synth pads in the background",
|
| 278 |
"./assets/bach.mp3",
|
| 279 |
+
25,
|
| 280 |
+
0,
|
| 281 |
+
5,
|
| 282 |
],
|
| 283 |
[
|
| 284 |
"A cheerful country song with acoustic guitars",
|
| 285 |
"./assets/bolero_ravel.mp3",
|
| 286 |
+
25,
|
| 287 |
+
0,
|
| 288 |
+
5,
|
| 289 |
+
],
|
| 290 |
+
[
|
| 291 |
+
"90s rock song with electric guitar and heavy drums",
|
| 292 |
+
"./assets/bach.mp3",
|
| 293 |
+
25,
|
| 294 |
+
0,
|
| 295 |
+
5,
|
| 296 |
],
|
|
|
|
| 297 |
[
|
| 298 |
"a light and cheerly EDM track, with syncopated drums, aery pads, and strong emotions",
|
| 299 |
"./assets/bach.mp3",
|
| 300 |
+
25,
|
| 301 |
+
0,
|
| 302 |
+
5,
|
| 303 |
],
|
| 304 |
[
|
| 305 |
"lofi slow bpm electro chill with organic samples",
|
| 306 |
+
"./assets/bolero_ravel.mp3",
|
| 307 |
+
25,
|
| 308 |
+
0,
|
| 309 |
+
5,
|
| 310 |
],
|
| 311 |
],
|
| 312 |
+
inputs=[text, melody, duration, continuation_start, continuation_end],
|
| 313 |
outputs=[output],
|
| 314 |
)
|
| 315 |
gr.Markdown(
|