Spaces:
Running
Running
asigalov61
commited on
Commit
•
cf68a1c
1
Parent(s):
a7f858a
Update app.py
Browse files
app.py
CHANGED
@@ -20,7 +20,7 @@ in_space = os.getenv("SYSTEM") == "spaces"
|
|
20 |
|
21 |
# =================================================================================================
|
22 |
|
23 |
-
def
|
24 |
print('=' * 70)
|
25 |
print('Req start time: {:%Y-%m-%d %H:%M:%S}'.format(datetime.datetime.now(PDT)))
|
26 |
start_time = reqtime.time()
|
@@ -169,16 +169,16 @@ if __name__ == "__main__":
|
|
169 |
output_midi = gr.File(label="Output MIDI file", file_types=[".mid"])
|
170 |
|
171 |
|
172 |
-
run_event = run_btn.click(
|
173 |
[output_midi_title, output_midi_summary, output_midi, output_audio, output_plot])
|
174 |
|
175 |
gr.Examples(
|
176 |
-
[["
|
177 |
-
["
|
178 |
],
|
179 |
-
[input_midi
|
180 |
[output_midi_title, output_midi_summary, output_midi, output_audio, output_plot],
|
181 |
-
|
182 |
cache_examples=True,
|
183 |
)
|
184 |
|
|
|
20 |
|
21 |
# =================================================================================================
|
22 |
|
23 |
+
def MixMelody(input_midi):
|
24 |
print('=' * 70)
|
25 |
print('Req start time: {:%Y-%m-%d %H:%M:%S}'.format(datetime.datetime.now(PDT)))
|
26 |
start_time = reqtime.time()
|
|
|
169 |
output_midi = gr.File(label="Output MIDI file", file_types=[".mid"])
|
170 |
|
171 |
|
172 |
+
run_event = run_btn.click(MixMelody, [input_midi],
|
173 |
[output_midi_title, output_midi_summary, output_midi, output_audio, output_plot])
|
174 |
|
175 |
gr.Examples(
|
176 |
+
[["Abracadabra-Sample-Melody.mid"],
|
177 |
+
["Sparks-Fly-Sample-Melody.mid"],
|
178 |
],
|
179 |
+
[input_midi],
|
180 |
[output_midi_title, output_midi_summary, output_midi, output_audio, output_plot],
|
181 |
+
MixMelody,
|
182 |
cache_examples=True,
|
183 |
)
|
184 |
|