Update app.py
Browse files83 unmodified lines84858687888990919293949596979899100101102103117 unmodified lines22122222322422522622783 unmodified lineselif render_type == "Extract melody":output_score = TMIDIX.extract_melody(cscore, melody_range=[48, 84])elif render_type == "Transform":output_score = TMIDIX.flip_enhanced_score_notes(escore)elif render_type == 'Repair':output_score = []for c in cscore:c.sort(key=lambda x: x[4], reverse=True)fixed_chord = TMIDIX.check_and_fix_chord(c)output_score.extend(fixed_chord)output_score.sort(key= lambda x: x[1])print('Done processing!')print('=' * 70)117 unmodified linesgr.Markdown("## Select desired render type")render_type = gr.Radio(["Render as-is", "Custom render", "Extract melody", "Transform", "Repair"], label="Render type", value="Render as-is")gr.Markdown("## Select desired render options")83 unmodified lines848586878889909192939495117 unmodified lines21321421521621721821983 unmodified lineselif render_type == "Extract melody":output_score = TMIDIX.extract_melody(cscore, melody_range=[48, 84])elif render_type == "Flip":output_score = TMIDIX.flip_enhanced_score_notes(escore)elif render_type == 'Repair':fixed_cscore = TMIDIX.advanced_check_and_fix_chords_in_chordified_score(cscore)output_score = TMIDIX.flatten(fixed_cscore)print('Done processing!')print('=' * 70)117 unmodified linesgr.Markdown("## Select desired render type")render_type = gr.Radio(["Render as-is", "Custom render", "Extract melody", "Flip", "Repair"], label="Render type", value="Render as-is")gr.Markdown("## Select desired render options")
app.py+4-12