Blane187 commited on
Commit
ff79d12
1 Parent(s): fc2c973

Update demo.py

Browse files
Files changed (1) hide show
  1. demo.py +8 -8
demo.py CHANGED
@@ -348,18 +348,18 @@ with gr.Blocks() as demo:
348
  f0_output = gr.Textbox(label="F0 Feature Extraction Log")
349
  train_output = gr.Textbox(label="Training Log")
350
 
351
- #preprocess_btn.click(preprocess_data, inputs=[model_name, dataset_folder], outputs=preprocess_output)
352
- #f0_btn.click(extract_f0_feature, inputs=[model_name, f0method], outputs=f0_output)
353
- #train_btn.click(train_index, inputs=[model_name, "v2"], outputs=train_output)
354
  with gr.TabItem("Train Your Model"):
355
  model_name_input = gr.Textbox(label="Model Name", placeholder="Enter the model name", interactive=True)
356
- epochs_slider = gr.Slider(minimum=50, maximum=2000, value=200, step=10, label="Epochs")
357
- save_frequency_slider = gr.Slider(minimum=10, maximum=100, value=50, step=10, label="Save Frequency")
358
- batch_size_slider = gr.Slider(minimum=1, maximum=20, value=8, step=1, label="Batch Size")
359
 
360
- train_button = gr.Button("Train Model")
361
  training_output = gr.Textbox(label="Training Log", interactive=False)
362
 
363
- #train_button.click(launch_training, inputs=[model_name_input, epochs_slider, save_frequency_slider, batch_size_slider], outputs=training_output)
364
 
365
  demo.launch()
 
348
  f0_output = gr.Textbox(label="F0 Feature Extraction Log")
349
  train_output = gr.Textbox(label="Training Log")
350
 
351
+ preprocess_btn.click(preprocess_data, inputs=[model_name, dataset_folder], outputs=preprocess_output)
352
+ f0_btn.click(extract_f0_feature, inputs=[model_name, f0method], outputs=f0_output)
353
+ train_btn.click(train_index, inputs=[model_name, "v2"], outputs=train_output)
354
  with gr.TabItem("Train Your Model"):
355
  model_name_input = gr.Textbox(label="Model Name", placeholder="Enter the model name", interactive=True)
356
+ epochs_slider = gr.Slider(minimum=50, maximum=2000, value=200, step=10, label="Epochs", interactive=True)
357
+ save_frequency_slider = gr.Slider(minimum=10, maximum=100, value=50, step=10, label="Save Frequency", interactive=True)
358
+ batch_size_slider = gr.Slider(minimum=1, maximum=20, value=8, step=1, label="Batch Size", interactive=True)
359
 
360
+ train_button = gr.Button("Train Model", interactive=True)
361
  training_output = gr.Textbox(label="Training Log", interactive=False)
362
 
363
+ train_button.click(launch_training, inputs=[model_name_input, epochs_slider, save_frequency_slider, batch_size_slider], outputs=training_output)
364
 
365
  demo.launch()