Update main/app/tabs/inference/inference.py
Browse files15 unmodified lines16171819202122289 unmodified lines31231331431531631714 unmodified lines332333334335336337338118 unmodified lines4574584594604614624636 unmodified lines4704714724734744754764774784794804817 unmodified lines48949049149249349449549649749849950015 unmodified lineswith gr.Row():model_pth = gr.Dropdown(label=translations["model_name"], choices=model_name, value=model_name[0] if len(model_name) >= 1 else "", interactive=True, allow_custom_value=True)model_index = gr.Dropdown(label=translations["index_path"], choices=index_path, value=index_path[0] if len(index_path) >= 1 else "", interactive=True, allow_custom_value=True)refesh = gr.Button(translations["refesh"])with gr.Row():with gr.Column():289 unmodified lineswith gr.Row():model_pth0 = gr.Dropdown(label=translations["model_name"], choices=model_name, value=model_name[0] if len(model_name) >= 1 else "", interactive=True, allow_custom_value=True)model_index0 = gr.Dropdown(label=translations["index_path"], choices=index_path, value=index_path[0] if len(index_path) >= 1 else "", interactive=True, allow_custom_value=True)with gr.Row():with gr.Column():14 unmodified linestts_voice = gr.Dropdown(label=translations["voice"], choices=edgetts, interactive=True, value="vi-VN-NamMinhNeural")tts_pitch = gr.Slider(minimum=-20, maximum=20, step=1, info=translations["pitch_info_2"], label=translations["pitch"], value=0, interactive=True)with gr.Column():refesh1 = gr.Button(translations["refesh"])with gr.Row():index_strength0 = gr.Slider(label=translations["index_strength"], info=translations["index_strength_info"], minimum=0, maximum=1, value=0.5, step=0.01, interactive=True, visible=model_index0.value != "")with gr.Accordion(translations["output_path"], open=False):118 unmodified linesgr.Markdown(translations["convert_with_whisper_info"])with gr.Row():with gr.Column():with gr.Group():with gr.Row():cleaner2 = gr.Checkbox(label=translations["clear_audio"], value=False, interactive=True)autotune2 = gr.Checkbox(label=translations["autotune"], value=False, interactive=True)6 unmodified linesconvert_button3 = gr.Button(translations["convert_audio"], variant="primary")with gr.Row():with gr.Column():with gr.Accordion(translations["model_accordion"] + " 1", open=True):with gr.Row():model_pth2 = gr.Dropdown(label=translations["model_name"], choices=model_name, value=model_name[0] if len(model_name) >= 1 else "", interactive=True, allow_custom_value=True)model_index2 = gr.Dropdown(label=translations["index_path"], choices=index_path, value=index_path[0] if len(index_path) >= 1 else "", interactive=True, allow_custom_value=True)with gr.Row():refesh2 = gr.Button(translations["refesh"])with gr.Row():pitch3 = gr.Slider(minimum=-20, maximum=20, step=1, info=translations["pitch_info"], label=translations["pitch"], value=0, interactive=True)index_strength2 = gr.Slider(label=translations["index_strength"], info=translations["index_strength_info"], minimum=0, maximum=1, value=0.5, step=0.01, interactive=True, visible=model_index2.value != "")7 unmodified lineswith gr.Row():input2 = gr.File(label=translations["drop_audio"], file_types=[".wav", ".mp3", ".flac", ".ogg", ".opus", ".m4a", ".mp4", ".aac", ".alac", ".wma", ".aiff", ".webm", ".ac3"])with gr.Column():with gr.Accordion(translations["model_accordion"] + " 2", open=True):with gr.Row():model_pth3 = gr.Dropdown(label=translations["model_name"], choices=model_name, value=model_name[0] if len(model_name) >= 1 else "", interactive=True, allow_custom_value=True)model_index3 = gr.Dropdown(label=translations["index_path"], choices=index_path, value=index_path[0] if len(index_path) >= 1 else "", interactive=True, allow_custom_value=True)with gr.Row():refesh3 = gr.Button(translations["refesh"])with gr.Row():pitch4 = gr.Slider(minimum=-20, maximum=20, step=1, info=translations["pitch_info"], label=translations["pitch"], value=0, interactive=True)index_strength3 = gr.Slider(label=translations["index_strength"], info=translations["index_strength_info"], minimum=0, maximum=1, value=0.5, step=0.01, interactive=True, visible=model_index3.value != "")15 unmodified lines16171819202122289 unmodified lines31231331431531631731814 unmodified lines333334335336337338339118 unmodified lines4584594604614624634644654664674684694704714724734744754764774786 unmodified lines4854864874884894904917 unmodified lines49950050150250350450515 unmodified lineswith gr.Row():model_pth = gr.Dropdown(label=translations["model_name"], choices=model_name, value=model_name[0] if len(model_name) >= 1 else "", interactive=True, allow_custom_value=True)model_index = gr.Dropdown(label=translations["index_path"], choices=index_path, value=index_path[0] if len(index_path) >= 1 else "", interactive=True, allow_custom_value=True)refesh = gr.Button(translations["refesh"])with gr.Row():with gr.Column():289 unmodified lineswith gr.Row():model_pth0 = gr.Dropdown(label=translations["model_name"], choices=model_name, value=model_name[0] if len(model_name) >= 1 else "", interactive=True, allow_custom_value=True)model_index0 = gr.Dropdown(label=translations["index_path"], choices=index_path, value=index_path[0] if len(index_path) >= 1 else "", interactive=True, allow_custom_value=True)refesh1 = gr.Button(translations["refesh"])with gr.Row():with gr.Column():14 unmodified linestts_voice = gr.Dropdown(label=translations["voice"], choices=edgetts, interactive=True, value="vi-VN-NamMinhNeural")tts_pitch = gr.Slider(minimum=-20, maximum=20, step=1, info=translations["pitch_info_2"], label=translations["pitch"], value=0, interactive=True)with gr.Column():with gr.Row():index_strength0 = gr.Slider(label=translations["index_strength"], info=translations["index_strength_info"], minimum=0, maximum=1, value=0.5, step=0.01, interactive=True, visible=model_index0.value != "")with gr.Accordion(translations["output_path"], open=False):118 unmodified linesgr.Markdown(translations["convert_with_whisper_info"])with gr.Row():with gr.Column():with gr.Accordion(translations["model_accordion"] + " 1", open=True):with gr.Row():model_pth2 = gr.Dropdown(label=translations["model_name"], choices=model_name, value=model_name[0] if len(model_name) >= 1 else "", interactive=True, allow_custom_value=True)model_index2 = gr.Dropdown(label=translations["index_path"], choices=index_path, value=index_path[0] if len(index_path) >= 1 else "", interactive=True, allow_custom_value=True)refesh2 = gr.Button(translations["refesh"])with gr.Accordion(translations["model_accordion"] + " 2", open=True):with gr.Row():model_pth3 = gr.Dropdown(label=translations["model_name"], choices=model_name, value=model_name[0] if len(model_name) >= 1 else "", interactive=True, allow_custom_value=True)model_index3 = gr.Dropdown(label=translations["index_path"], choices=index_path, value=index_path[0] if len(index_path) >= 1 else "", interactive=True, allow_custom_value=True)refesh3 = gr.Button(translations["refesh"])with gr.Group():with gr.Row():cleaner2 = gr.Checkbox(label=translations["clear_audio"], value=False, interactive=True)autotune2 = gr.Checkbox(label=translations["autotune"], value=False, interactive=True)6 unmodified linesconvert_button3 = gr.Button(translations["convert_audio"], variant="primary")with gr.Row():with gr.Column():with gr.Row():pitch3 = gr.Slider(minimum=-20, maximum=20, step=1, info=translations["pitch_info"], label=translations["pitch"], value=0, interactive=True)index_strength2 = gr.Slider(label=translations["index_strength"], info=translations["index_strength_info"], minimum=0, maximum=1, value=0.5, step=0.01, interactive=True, visible=model_index2.value != "")7 unmodified lineswith gr.Row():input2 = gr.File(label=translations["drop_audio"], file_types=[".wav", ".mp3", ".flac", ".ogg", ".opus", ".m4a", ".mp4", ".aac", ".alac", ".wma", ".aiff", ".webm", ".ac3"])with gr.Column():with gr.Row():pitch4 = gr.Slider(minimum=-20, maximum=20, step=1, info=translations["pitch_info"], label=translations["pitch"], value=0, interactive=True)index_strength3 = gr.Slider(label=translations["index_strength"], info=translations["index_strength_info"], minimum=0, maximum=1, value=0.5, step=0.01, interactive=True, visible=model_index3.value != "")
main/app/tabs/inference/inference.py+19-14