Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -186,7 +186,12 @@ def Generate_Accompaniment(input_midi,
|
|
186 |
|
187 |
#===============================================================================
|
188 |
|
189 |
-
def generate_full_seq(input_seq,
|
|
|
|
|
|
|
|
|
|
|
190 |
|
191 |
seq_abs_run_time = sum([t for t in input_seq if t < 128])
|
192 |
|
@@ -196,7 +201,7 @@ def Generate_Accompaniment(input_midi,
|
|
196 |
|
197 |
toks_counter = 0
|
198 |
|
199 |
-
while cur_time <= seq_abs_run_time+
|
200 |
|
201 |
if verbose:
|
202 |
if toks_counter % 128 == 0:
|
@@ -241,7 +246,9 @@ def Generate_Accompaniment(input_midi,
|
|
241 |
fn = os.path.basename(input_midi)
|
242 |
fn1 = fn.split('.')[0]
|
243 |
print('Input MIDI file name:', fn)
|
244 |
-
|
|
|
|
|
245 |
print('Source melody patch:', melody_patch)
|
246 |
print('Use nth melody note:', use_nth_note)
|
247 |
print('Model temperature:', model_temperature)
|
|
|
186 |
|
187 |
#===============================================================================
|
188 |
|
189 |
+
def generate_full_seq(input_seq,
|
190 |
+
max_toks=3072,
|
191 |
+
temperature=0.9,
|
192 |
+
top_k_value=15,
|
193 |
+
verbose=True
|
194 |
+
):
|
195 |
|
196 |
seq_abs_run_time = sum([t for t in input_seq if t < 128])
|
197 |
|
|
|
201 |
|
202 |
toks_counter = 0
|
203 |
|
204 |
+
while cur_time <= seq_abs_run_time+8:
|
205 |
|
206 |
if verbose:
|
207 |
if toks_counter % 128 == 0:
|
|
|
246 |
fn = os.path.basename(input_midi)
|
247 |
fn1 = fn.split('.')[0]
|
248 |
print('Input MIDI file name:', fn)
|
249 |
+
|
250 |
+
else:
|
251 |
+
print('Input sample melody:', input_melody)
|
252 |
print('Source melody patch:', melody_patch)
|
253 |
print('Use nth melody note:', use_nth_note)
|
254 |
print('Model temperature:', model_temperature)
|