Update app.py
Browse files
app.py
CHANGED
@@ -26,24 +26,22 @@ with gr.Blocks() as demo:
|
|
26 |
with gr.Row():
|
27 |
output_message = gr.Textbox(label="Output Message",interactive=False)
|
28 |
output_audio = gr.Audio(label="Output Audio",interactive=False)
|
29 |
-
|
30 |
-
with gr.Tab("# Training"):
|
31 |
-
model_name = gr.Textbox(label="Model Name (No spaces or symbols)")
|
32 |
-
dataset_folder = gr.Textbox(label="Dataset Folder", value="/content/dataset")
|
33 |
-
f0method = gr.Dropdown(["pm", "harvest", "rmvpe", "rmvpe_gpu"], label="F0 Method", value="rmvpe_gpu")
|
34 |
-
|
35 |
-
preprocess_btn = gr.Button("Start Preprocessing")
|
36 |
-
f0_btn = gr.Button("Extract F0 Feature")
|
37 |
-
train_btn = gr.Button("Train Index")
|
38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
preprocess_output = gr.Textbox(label="Preprocessing Log")
|
40 |
f0_output = gr.Textbox(label="F0 Feature Extraction Log")
|
41 |
train_output = gr.Textbox(label="Training Log")
|
42 |
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
|
49 |
-
demo.launch()
|
|
|
26 |
with gr.Row():
|
27 |
output_message = gr.Textbox(label="Output Message",interactive=False)
|
28 |
output_audio = gr.Audio(label="Output Audio",interactive=False)
|
29 |
+
run_btn.click(run_inference, [model_name, pitch, input_path, f0_method, save_as, index_rate, volume_normalization, consonant_protection], output_message)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
+
with gr.Tab("Training"):\
|
32 |
+
model_name = gr.Textbox(label="Model Name (No spaces or symbols)")
|
33 |
+
dataset_folder = gr.Textbox(label="Dataset Folder", value="/content/dataset")
|
34 |
+
f0method = gr.Dropdown(["pm", "harvest", "rmvpe", "rmvpe_gpu"], label="F0 Method", value="rmvpe_gpu")
|
35 |
+
|
36 |
+
preprocess_btn = gr.Button("Start Preprocessing")
|
37 |
+
f0_btn = gr.Button("Extract F0 Feature")
|
38 |
+
train_btn = gr.Button("Train Index")
|
39 |
preprocess_output = gr.Textbox(label="Preprocessing Log")
|
40 |
f0_output = gr.Textbox(label="F0 Feature Extraction Log")
|
41 |
train_output = gr.Textbox(label="Training Log")
|
42 |
|
43 |
+
preprocess_btn.click(preprocess_data, inputs=[model_name, dataset_folder], outputs=preprocess_output)
|
44 |
+
f0_btn.click(extract_f0_feature, inputs=[model_name, f0method], outputs=f0_output)
|
45 |
+
train_btn.click(train_index, inputs=[model_name, "v2"], outputs=train_output)
|
|
|
|
|
46 |
|
47 |
+
demo.launch()
|