Spaces:
Running
Running
Update src/modules/ui_updates.py
Browse files1234567891011121314151617181920212223242512345678910111213141516171819202122232425import gradio as gr
def show_hop_slider(pitch_detection_algo):
if pitch_detection_algo in ['mangio-crepe']:
return gr.update(visible=True)
else:
return gr.update(visible=False)
def update_f0_method(use_hybrid_methods):
if use_hybrid_methods:
return gr.update(choices=['hybrid[rmvpe+fcpe]', 'hybrid[rmvpe+crepe]', 'hybrid[crepe+rmvpe]', 'hybrid[crepe+fcpe]', 'hybrid[crepe+rmvpe+fcpe]'], value='hybrid[rmvpe+fcpe]')
else:
return gr.update(choices=['rmvpe+', 'fcpe', 'rmvpe', 'mangio-crepe', 'crepe'], value='rmvpe+')
def update_button_text():
return gr.update(label="Загрузить другой аудио-файл")
def update_button_text_voc():
return gr.update(label="Загрузить другой вокал")
def update_button_text_inst():
return gr.update(label="Загрузить другой инструментал")import gradio as gr
def show_hop_slider(pitch_detection_algo): if pitch_detection_algo in ['mangio-crepe']: return gr.update(visible=True) else: return gr.update(visible=False)
def update_f0_method(use_hybrid_methods): if use_hybrid_methods: return gr.update(choices=['hybrid[rmvpe+fcpe]', 'hybrid[rmvpe+crepe]', 'hybrid[crepe+rmvpe]', 'hybrid[crepe+fcpe]', 'hybrid[crepe+rmvpe+fcpe]'], value='hybrid[rmvpe+fcpe]') else: return gr.update(choices=['rmvpe+', 'fcpe', 'rmvpe', 'mangio-crepe', 'crepe'], value='rmvpe+')
def update_button_text(): return gr.update(label="Upload different audio file")
def update_button_text_voc(): return gr.update(label="Upload different vocals")
def update_button_text_inst(): return gr.update(label="Upload different instrumental")src/modules/ui_updates.py+25-25