Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -186,10 +186,10 @@ def load_midi(input_midi):
|
|
186 |
#==================================================================================
|
187 |
|
188 |
@spaces.GPU
|
189 |
-
def
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
|
194 |
#===============================================================================
|
195 |
|
@@ -428,6 +428,11 @@ with gr.Blocks() as demo:
|
|
428 |
|
429 |
gr.Markdown("## Generation options")
|
430 |
|
|
|
|
|
|
|
|
|
|
|
431 |
model_temperature = gr.Slider(0.1, 1, value=0.9, step=0.01, label="Model temperature")
|
432 |
model_sampling_top_p = gr.Slider(0.1, 0.99, value=0.96, step=0.01, label="Model sampling top p value")
|
433 |
|
@@ -440,7 +445,7 @@ with gr.Blocks() as demo:
|
|
440 |
output_plot = gr.Plot(label="MIDI score plot")
|
441 |
output_midi = gr.File(label="MIDI file", file_types=[".mid"])
|
442 |
|
443 |
-
generate_btn.click(
|
444 |
[input_midi,
|
445 |
model_temperature,
|
446 |
model_sampling_top_p
|
@@ -462,7 +467,7 @@ with gr.Blocks() as demo:
|
|
462 |
output_plot,
|
463 |
output_midi
|
464 |
],
|
465 |
-
|
466 |
)
|
467 |
|
468 |
#==================================================================================
|
|
|
186 |
#==================================================================================
|
187 |
|
188 |
@spaces.GPU
|
189 |
+
def Humanize_MIDI(input_midi,
|
190 |
+
model_temperature,
|
191 |
+
model_sampling_top_p
|
192 |
+
):
|
193 |
|
194 |
#===============================================================================
|
195 |
|
|
|
428 |
|
429 |
gr.Markdown("## Generation options")
|
430 |
|
431 |
+
num_prime_toks = gr.Slider(0, 1024, value=16, step=1, label="Number of prime tokens")
|
432 |
+
|
433 |
+
humanize_durations = gr.Checkbox(value=False, label="Humanize durations")
|
434 |
+
humanize_velocities = gr.Checkbox(value=True, label="Humanize velocities")
|
435 |
+
|
436 |
model_temperature = gr.Slider(0.1, 1, value=0.9, step=0.01, label="Model temperature")
|
437 |
model_sampling_top_p = gr.Slider(0.1, 0.99, value=0.96, step=0.01, label="Model sampling top p value")
|
438 |
|
|
|
445 |
output_plot = gr.Plot(label="MIDI score plot")
|
446 |
output_midi = gr.File(label="MIDI file", file_types=[".mid"])
|
447 |
|
448 |
+
generate_btn.click(Humanize_MIDI,
|
449 |
[input_midi,
|
450 |
model_temperature,
|
451 |
model_sampling_top_p
|
|
|
467 |
output_plot,
|
468 |
output_midi
|
469 |
],
|
470 |
+
Humanize_MIDI
|
471 |
)
|
472 |
|
473 |
#==================================================================================
|