Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -241,6 +241,7 @@ if __name__ == "__main__":
|
|
241 |
[["Acoustic Guitar(nylon)", "Acoustic Guitar(steel)", "Electric Guitar(jazz)",
|
242 |
"Electric Guitar(clean)", "Electric Guitar(muted)", "Overdriven Guitar", "Distortion Guitar",
|
243 |
"Electric Bass(finger)"], "Standard"],
|
|
|
244 |
[["Acoustic Grand", "String Ensemble 1", "Trombone", "Tuba", "Muted Trumpet", "French Horn", "Oboe",
|
245 |
"English Horn", "Bassoon", "Clarinet"], "Orchestra"]
|
246 |
|
@@ -257,10 +258,12 @@ if __name__ == "__main__":
|
|
257 |
tab2.select(lambda: 1, None, tab_select, queue=False)
|
258 |
input_gen_events = gr.Slider(label="generate n midi events", minimum=1, maximum=opt.max_gen,
|
259 |
step=1, value=opt.max_gen // 2)
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
|
|
|
|
264 |
run_btn = gr.Button("generate", variant="primary")
|
265 |
stop_btn = gr.Button("stop and output")
|
266 |
output_midi_seq = gr.Variable()
|
|
|
241 |
[["Acoustic Guitar(nylon)", "Acoustic Guitar(steel)", "Electric Guitar(jazz)",
|
242 |
"Electric Guitar(clean)", "Electric Guitar(muted)", "Overdriven Guitar", "Distortion Guitar",
|
243 |
"Electric Bass(finger)"], "Standard"],
|
244 |
+
[["Flute","Cello","Bassoon","Tuba"],"None"],
|
245 |
[["Acoustic Grand", "String Ensemble 1", "Trombone", "Tuba", "Muted Trumpet", "French Horn", "Oboe",
|
246 |
"English Horn", "Bassoon", "Clarinet"], "Orchestra"]
|
247 |
|
|
|
258 |
tab2.select(lambda: 1, None, tab_select, queue=False)
|
259 |
input_gen_events = gr.Slider(label="generate n midi events", minimum=1, maximum=opt.max_gen,
|
260 |
step=1, value=opt.max_gen // 2)
|
261 |
+
with gr.Accordion("options", open=False):
|
262 |
+
input_temp = gr.Slider(label="temperature", minimum=0.1, maximum=1.2, step=0.01, value=1)
|
263 |
+
input_top_p = gr.Slider(label="top p", minimum=0.1, maximum=1, step=0.01, value=0.98)
|
264 |
+
input_top_k = gr.Slider(label="top k", minimum=1, maximum=20, step=1, value=12)
|
265 |
+
input_allow_cc = gr.Checkbox(label="allow midi cc event", value=True)
|
266 |
+
example3 = gr.Examples([[1, 0.98, 12], [1.2, 0.95, 8]], [input_temp, input_top_p, input_top_k])
|
267 |
run_btn = gr.Button("generate", variant="primary")
|
268 |
stop_btn = gr.Button("stop and output")
|
269 |
output_midi_seq = gr.Variable()
|