Blane187 commited on
Commit
136a5c7
·
verified ·
1 Parent(s): a2b48b4

Update demo.py

Browse files
Files changed (1) hide show
  1. demo.py +18 -3
demo.py CHANGED
@@ -173,8 +173,23 @@ with gr.Blocks() as demo:
173
  with gr.Row():
174
  output_message = gr.Textbox(label="Output Message",interactive=False)
175
  output_audio = gr.Audio(label="Output Audio",interactive=False)
176
- #run_btn.click(run_inference, [model_name, pitch, input_path, f0_method, save_as, index_rate, volume_normalization, consonant_protection], output_message)
177
-
178
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
179
 
180
  demo.launch()
 
173
  with gr.Row():
174
  output_message = gr.Textbox(label="Output Message",interactive=False)
175
  output_audio = gr.Audio(label="Output Audio",interactive=False)
176
+ run_btn.click(run_inference, [model_name, pitch, input_path, f0_method, save_as, index_rate, volume_normalization, consonant_protection], output_message)
177
+
178
+ with gr.Tab("Training"):
179
+ model_name = gr.Textbox(label="Model Name (No spaces or symbols)")
180
+ dataset_folder = gr.Textbox(label="Dataset Folder", value="/content/dataset")
181
+ f0method = gr.Dropdown(["pm", "harvest", "rmvpe", "rmvpe_gpu"], label="F0 Method", value="rmvpe_gpu")
182
+
183
+ preprocess_btn = gr.Button("Start Preprocessing")
184
+ f0_btn = gr.Button("Extract F0 Feature")
185
+ train_btn = gr.Button("Train Index")
186
+
187
+ preprocess_output = gr.Textbox(label="Preprocessing Log")
188
+ f0_output = gr.Textbox(label="F0 Feature Extraction Log")
189
+ train_output = gr.Textbox(label="Training Log")
190
+
191
+ preprocess_btn.click(preprocess_data, inputs=[model_name, dataset_folder], outputs=preprocess_output)
192
+ f0_btn.click(extract_f0_feature, inputs=[model_name, f0method], outputs=f0_output)
193
+ train_btn.click(train_index, inputs=[model_name, "v2"], outputs=train_output)
194
 
195
  demo.launch()