Spaces:
Running
on
Zero
Running
on
Zero
asigalov61
commited on
Commit
•
d3eb29d
1
Parent(s):
e367927
Update app.py
Browse files
app.py
CHANGED
@@ -404,6 +404,9 @@ if __name__ == "__main__":
|
|
404 |
input_number_prime_tokens = gr.Slider(0, 1024, value=512, step=16, label="Number of prime tokens")
|
405 |
input_number_gen_tokens = gr.Slider(0, 2048, value=512, step=16, label="Number of tokens to generate")
|
406 |
|
|
|
|
|
|
|
407 |
run_btn = gr.Button("generate", variant="primary")
|
408 |
|
409 |
gr.Markdown("## Generation results")
|
@@ -419,20 +422,24 @@ if __name__ == "__main__":
|
|
419 |
input_match_original_pitches_counts,
|
420 |
input_freestyle_continuation,
|
421 |
input_number_prime_tokens,
|
422 |
-
input_number_gen_tokens
|
|
|
|
|
423 |
],
|
424 |
[output_midi_title, output_midi_summary, output_midi, output_audio, output_plot])
|
425 |
|
426 |
gr.Examples(
|
427 |
-
[["Sharing The Night Together.kar", 256, True, True, False, 512, 1024],
|
428 |
-
["Hotel California.mid", 256, True, True, False, 512, 1024],
|
429 |
],
|
430 |
[input_number_prime_chords,
|
431 |
input_use_original_durations,
|
432 |
input_match_original_pitches_counts,
|
433 |
input_freestyle_continuation,
|
434 |
input_number_prime_tokens,
|
435 |
-
input_number_gen_tokens
|
|
|
|
|
436 |
],
|
437 |
[output_midi_title, output_midi_summary, output_midi, output_audio, output_plot],
|
438 |
Generate_Rock_Song,
|
|
|
404 |
input_number_prime_tokens = gr.Slider(0, 1024, value=512, step=16, label="Number of prime tokens")
|
405 |
input_number_gen_tokens = gr.Slider(0, 2048, value=512, step=16, label="Number of tokens to generate")
|
406 |
|
407 |
+
input_model_temperature = gr.Slider(0.1, 1.0, value=0.9, step=0.05, label="Model temperature")
|
408 |
+
input_model_top_k = gr.Slider(1, 50, value=10, step=1, label="Model sampling top k value")
|
409 |
+
|
410 |
run_btn = gr.Button("generate", variant="primary")
|
411 |
|
412 |
gr.Markdown("## Generation results")
|
|
|
422 |
input_match_original_pitches_counts,
|
423 |
input_freestyle_continuation,
|
424 |
input_number_prime_tokens,
|
425 |
+
input_number_gen_tokens,
|
426 |
+
input_model_temperature,
|
427 |
+
input_model_top_k
|
428 |
],
|
429 |
[output_midi_title, output_midi_summary, output_midi, output_audio, output_plot])
|
430 |
|
431 |
gr.Examples(
|
432 |
+
[["Sharing The Night Together.kar", 256, True, True, False, 512, 1024, 0.9, 10],
|
433 |
+
["Hotel California.mid", 256, True, True, False, 512, 1024, 0.9, 10],
|
434 |
],
|
435 |
[input_number_prime_chords,
|
436 |
input_use_original_durations,
|
437 |
input_match_original_pitches_counts,
|
438 |
input_freestyle_continuation,
|
439 |
input_number_prime_tokens,
|
440 |
+
input_number_gen_tokens,
|
441 |
+
input_model_temperature,
|
442 |
+
input_model_top_k
|
443 |
],
|
444 |
[output_midi_title, output_midi_summary, output_midi, output_audio, output_plot],
|
445 |
Generate_Rock_Song,
|