Spaces:
Running
on
Zero
Running
on
Zero
mrfakename
commited on
Commit
•
c1aae9d
1
Parent(s):
7670c1c
Update app.py
Browse files
app.py
CHANGED
@@ -14,8 +14,8 @@ def gen(piano_only, length):
|
|
14 |
text = midi.strip()
|
15 |
mid = midi_util.convert_str_to_midi(cfg, text)
|
16 |
with tempfile.NamedTemporaryFile(suffix='.midi', delete=False) as tmp:
|
17 |
-
mid.save(tmp)
|
18 |
-
yield midi, tmp
|
19 |
with gr.Blocks() as demo:
|
20 |
piano_only = gr.Checkbox(label="Piano Only")
|
21 |
length = gr.Slider(label="Length (in tokens)", minimum=4, maximum=4096, step=1, value=4096)
|
|
|
14 |
text = midi.strip()
|
15 |
mid = midi_util.convert_str_to_midi(cfg, text)
|
16 |
with tempfile.NamedTemporaryFile(suffix='.midi', delete=False) as tmp:
|
17 |
+
mid.save(tmp.name)
|
18 |
+
yield midi, tmp.name
|
19 |
with gr.Blocks() as demo:
|
20 |
piano_only = gr.Checkbox(label="Piano Only")
|
21 |
length = gr.Slider(label="Length (in tokens)", minimum=4, maximum=4096, step=1, value=4096)
|