Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
799558e
1
Parent(s):
adfb568
Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,11 @@ in_space = os.getenv("SYSTEM") == "spaces"
|
|
22 |
@torch.no_grad()
|
23 |
def GenerateMIDI(num_tok, idrums, iinstr, progress=gr.Progress()):
|
24 |
|
|
|
25 |
print('Req num tok', num_tok)
|
|
|
|
|
|
|
26 |
|
27 |
if idrums:
|
28 |
drums = 3074
|
@@ -56,9 +60,6 @@ def GenerateMIDI(num_tok, idrums, iinstr, progress=gr.Progress()):
|
|
56 |
|
57 |
melody_chords_f = outy
|
58 |
|
59 |
-
print('=' * 70)
|
60 |
-
print('Done!')
|
61 |
-
print('=' * 70)
|
62 |
print('Sample INTs', melody_chords_f[:12])
|
63 |
print('=' * 70)
|
64 |
|
@@ -210,7 +211,7 @@ if __name__ == "__main__":
|
|
210 |
|
211 |
input_drums = gr.Checkbox(label="Drums Controls", value = False, info="Drums present or not")
|
212 |
input_instrument = gr.Radio(["Piano", "Guitar", "Bass", "Violin", "Cello", "Harp", "Trumpet", "Sax", "Flute", "Choir", "Organ"], value="Piano", label="Lead Instrument Controls", info="Desired lead instrument")
|
213 |
-
input_num_tokens = gr.Slider(16,
|
214 |
run_btn = gr.Button("generate", variant="primary")
|
215 |
|
216 |
output_midi_seq = gr.Variable()
|
|
|
22 |
@torch.no_grad()
|
23 |
def GenerateMIDI(num_tok, idrums, iinstr, progress=gr.Progress()):
|
24 |
|
25 |
+
print('=' * 70)
|
26 |
print('Req num tok', num_tok)
|
27 |
+
print('Req instr', iinstr)
|
28 |
+
print('Drums', idrums)
|
29 |
+
print('=' * 70)
|
30 |
|
31 |
if idrums:
|
32 |
drums = 3074
|
|
|
60 |
|
61 |
melody_chords_f = outy
|
62 |
|
|
|
|
|
|
|
63 |
print('Sample INTs', melody_chords_f[:12])
|
64 |
print('=' * 70)
|
65 |
|
|
|
211 |
|
212 |
input_drums = gr.Checkbox(label="Drums Controls", value = False, info="Drums present or not")
|
213 |
input_instrument = gr.Radio(["Piano", "Guitar", "Bass", "Violin", "Cello", "Harp", "Trumpet", "Sax", "Flute", "Choir", "Organ"], value="Piano", label="Lead Instrument Controls", info="Desired lead instrument")
|
214 |
+
input_num_tokens = gr.Slider(16, 256, value=128, label="Number of Tokens", info="Number of tokens to generate")
|
215 |
run_btn = gr.Button("generate", variant="primary")
|
216 |
|
217 |
output_midi_seq = gr.Variable()
|