Spaces:
Running
on
Zero
Running
on
Zero
asigalov61
commited on
Commit
•
6da0de9
1
Parent(s):
dbd536f
Update app.py
Browse files
app.py
CHANGED
@@ -377,11 +377,11 @@ def generate_callback_wrapper(input_midi,
|
|
377 |
print('Req start time: {:%Y-%m-%d %H:%M:%S}'.format(datetime.datetime.now(PDT)))
|
378 |
start_time = reqtime.time()
|
379 |
|
380 |
-
fn = os.path.basename(input_midi.name)
|
381 |
-
fn1 = fn.split('.')[0]
|
382 |
-
|
383 |
print('=' * 70)
|
384 |
-
|
|
|
|
|
|
|
385 |
print('Num prime tokens:', num_prime_tokens)
|
386 |
print('Num gen tokens:', num_gen_tokens)
|
387 |
print('Gen outro:', gen_outro)
|
@@ -485,7 +485,7 @@ with gr.Blocks() as demo:
|
|
485 |
" for faster execution and endless generation"
|
486 |
)
|
487 |
|
488 |
-
gr.Markdown("## Upload
|
489 |
|
490 |
input_midi = gr.File(label="Input MIDI", file_types=[".midi", ".mid", ".kar"])
|
491 |
clear_btn = gr.ClearButton(input_midi, variant="stop", value="Reset")
|
|
|
377 |
print('Req start time: {:%Y-%m-%d %H:%M:%S}'.format(datetime.datetime.now(PDT)))
|
378 |
start_time = reqtime.time()
|
379 |
|
|
|
|
|
|
|
380 |
print('=' * 70)
|
381 |
+
if input_midi is not None:
|
382 |
+
fn = os.path.basename(input_midi.name)
|
383 |
+
fn1 = fn.split('.')[0]
|
384 |
+
print('Input file name:', fn)
|
385 |
print('Num prime tokens:', num_prime_tokens)
|
386 |
print('Num gen tokens:', num_gen_tokens)
|
387 |
print('Gen outro:', gen_outro)
|
|
|
485 |
" for faster execution and endless generation"
|
486 |
)
|
487 |
|
488 |
+
gr.Markdown("## Upload seed MIDI or click 'Generate' button to for random output")
|
489 |
|
490 |
input_midi = gr.File(label="Input MIDI", file_types=[".midi", ".mid", ".kar"])
|
491 |
clear_btn = gr.ClearButton(input_midi, variant="stop", value="Reset")
|