Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -260,18 +260,11 @@ def Classify_MIDI_Genre(input_midi):
|
|
| 260 |
print('=' * 70)
|
| 261 |
print('Requested settings:')
|
| 262 |
print('=' * 70)
|
| 263 |
-
if input_midi:
|
| 264 |
-
fn = os.path.basename(input_midi)
|
| 265 |
-
fn1 = fn.split('.')[0]
|
| 266 |
-
print('Input MIDI file name:', fn)
|
| 267 |
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
print('
|
| 272 |
-
print('Model temperature:', model_temperature)
|
| 273 |
-
print('Model top k:', model_sampling_top_k)
|
| 274 |
-
|
| 275 |
print('=' * 70)
|
| 276 |
|
| 277 |
#===============================================================================
|
|
@@ -479,7 +472,21 @@ with gr.Blocks() as demo:
|
|
| 479 |
output_midi
|
| 480 |
]
|
| 481 |
)
|
| 482 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 483 |
#==================================================================================
|
| 484 |
|
| 485 |
demo.launch()
|
|
|
|
| 260 |
print('=' * 70)
|
| 261 |
print('Requested settings:')
|
| 262 |
print('=' * 70)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 263 |
|
| 264 |
+
fn = os.path.basename(input_midi)
|
| 265 |
+
fn1 = fn.split('.')[0]
|
| 266 |
+
|
| 267 |
+
print('Input MIDI file name:', fn)
|
|
|
|
|
|
|
|
|
|
| 268 |
print('=' * 70)
|
| 269 |
|
| 270 |
#===============================================================================
|
|
|
|
| 472 |
output_midi
|
| 473 |
]
|
| 474 |
)
|
| 475 |
+
|
| 476 |
+
gr.Examples(
|
| 477 |
+
[["Hotel California.mid"],
|
| 478 |
+
["Come To My Window.mid"]
|
| 479 |
+
],
|
| 480 |
+
[input_midi
|
| 481 |
+
],
|
| 482 |
+
[output_title,
|
| 483 |
+
output_audio,
|
| 484 |
+
output_plot,
|
| 485 |
+
output_midi
|
| 486 |
+
],
|
| 487 |
+
Classify_MIDI_Genre
|
| 488 |
+
)
|
| 489 |
+
|
| 490 |
#==================================================================================
|
| 491 |
|
| 492 |
demo.launch()
|