drewThomasson commited on
Commit
60cce78
1 Parent(s): b91c08d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -4
app.py CHANGED
@@ -152,6 +152,12 @@ if __name__ == "__main__":
152
  """,
153
  formatter_class=argparse.RawTextHelpFormatter,
154
  )
 
 
 
 
 
 
155
  parser.add_argument(
156
  "--share",
157
  action="store_true",
@@ -216,7 +222,7 @@ if __name__ == "__main__":
216
 
217
  audio_folder_path = gr.Textbox(
218
  label="Path to the folder with audio files (optional):",
219
- value="",
220
  )
221
 
222
  whisper_model = gr.Dropdown(
@@ -611,6 +617,8 @@ if __name__ == "__main__":
611
  model_zip_file = gr.File(label="Download Optimized Model", interactive=False)
612
  dataset_zip_file = gr.File(label="Download Dataset", interactive=False)
613
 
 
 
614
  with gr.Column() as col3:
615
  progress_gen = gr.Label(
616
  label="Progress:"
@@ -618,7 +626,6 @@ if __name__ == "__main__":
618
  tts_output_audio = gr.Audio(label="Generated Audio.")
619
  reference_audio = gr.Audio(label="Reference audio used.")
620
 
621
-
622
  prompt_compute_btn.click(
623
  fn=preprocess_dataset,
624
  inputs=[
@@ -712,7 +719,7 @@ if __name__ == "__main__":
712
  ],
713
  outputs=[progress_load,xtts_checkpoint,xtts_config,xtts_vocab,xtts_speaker,speaker_reference_audio],
714
  )
715
-
716
  model_download_btn.click(
717
  fn=get_model_zip,
718
  inputs=[out_path],
@@ -731,4 +738,4 @@ if __name__ == "__main__":
731
  #server_port=args.port,
732
  # inweb=True,
733
  # server_name="localhost"
734
- )
 
152
  """,
153
  formatter_class=argparse.RawTextHelpFormatter,
154
  )
155
+ parser.add_argument(
156
+ "--audio_folder_path",
157
+ type=str,
158
+ help="Path to the folder with audio files (optional)",
159
+ default="",
160
+ )
161
  parser.add_argument(
162
  "--share",
163
  action="store_true",
 
222
 
223
  audio_folder_path = gr.Textbox(
224
  label="Path to the folder with audio files (optional):",
225
+ value=args.audio_folder_path,
226
  )
227
 
228
  whisper_model = gr.Dropdown(
 
617
  model_zip_file = gr.File(label="Download Optimized Model", interactive=False)
618
  dataset_zip_file = gr.File(label="Download Dataset", interactive=False)
619
 
620
+
621
+
622
  with gr.Column() as col3:
623
  progress_gen = gr.Label(
624
  label="Progress:"
 
626
  tts_output_audio = gr.Audio(label="Generated Audio.")
627
  reference_audio = gr.Audio(label="Reference audio used.")
628
 
 
629
  prompt_compute_btn.click(
630
  fn=preprocess_dataset,
631
  inputs=[
 
719
  ],
720
  outputs=[progress_load,xtts_checkpoint,xtts_config,xtts_vocab,xtts_speaker,speaker_reference_audio],
721
  )
722
+
723
  model_download_btn.click(
724
  fn=get_model_zip,
725
  inputs=[out_path],
 
738
  #server_port=args.port,
739
  # inweb=True,
740
  # server_name="localhost"
741
+ )