asigalov61 commited on
Commit
cf68a1c
1 Parent(s): a7f858a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -20,7 +20,7 @@ in_space = os.getenv("SYSTEM") == "spaces"
20
 
21
  # =================================================================================================
22
 
23
- def AddMelody(input_midi, input_channel, input_patch, input_start_chord):
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(AddMelody, [input_midi, input_channel, input_patch, input_start_chord],
173
  [output_midi_title, output_midi_summary, output_midi, output_audio, output_plot])
174
 
175
  gr.Examples(
176
- [["Sharing The Night Together.kar", 3, 40, 0],
177
- ["Deep Relaxation Melody #6.mid", 3, 40, 0],
178
  ],
179
- [input_midi, input_channel, input_patch, input_start_chord],
180
  [output_midi_title, output_midi_summary, output_midi, output_audio, output_plot],
181
- AddMelody,
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