Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -344,15 +344,10 @@ def reset(final_composition=[], generated_batches=[], block_lines=[]):
|
|
344 |
"""Reset composition state."""
|
345 |
return [], [], []
|
346 |
|
347 |
-
def reset_demo(final_composition=[], generated_batches=[], block_lines=[]):
|
348 |
-
"""Reset state for demo unload."""
|
349 |
-
return [], [], []
|
350 |
-
|
351 |
# -----------------------------
|
352 |
# GRADIO INTERFACE SETUP
|
353 |
# -----------------------------
|
354 |
with gr.Blocks() as demo:
|
355 |
-
demo.load(reset_demo)
|
356 |
|
357 |
gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Godzilla Piano Transformer</h1>")
|
358 |
gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Fast 807M 4k solo Piano music transformer trained on 1.14M+ MIDIs (2.7M+ samples)</h1>")
|
@@ -421,6 +416,4 @@ with gr.Blocks() as demo:
|
|
421 |
clear_btn.click(clear, inputs=None,
|
422 |
outputs=[final_audio_output, final_plot_output, final_file_output, final_composition, block_lines])
|
423 |
|
424 |
-
demo.unload(reset_demo)
|
425 |
-
|
426 |
demo.launch()
|
|
|
344 |
"""Reset composition state."""
|
345 |
return [], [], []
|
346 |
|
|
|
|
|
|
|
|
|
347 |
# -----------------------------
|
348 |
# GRADIO INTERFACE SETUP
|
349 |
# -----------------------------
|
350 |
with gr.Blocks() as demo:
|
|
|
351 |
|
352 |
gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Godzilla Piano Transformer</h1>")
|
353 |
gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Fast 807M 4k solo Piano music transformer trained on 1.14M+ MIDIs (2.7M+ samples)</h1>")
|
|
|
416 |
clear_btn.click(clear, inputs=None,
|
417 |
outputs=[final_audio_output, final_plot_output, final_file_output, final_composition, block_lines])
|
418 |
|
|
|
|
|
419 |
demo.launch()
|