drewThomasson commited on
Commit
5b848db
1 Parent(s): 690e666

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -624,12 +624,11 @@ def convert_chapters_to_audio_standard_model(chapters_dir, output_audio_dir, tar
624
 
625
  # Define the functions to be used in the Gradio interface
626
  def convert_ebook_to_audio(ebook_file, target_voice_file, language, use_custom_model, custom_model_file, custom_config_file, custom_vocab_file, custom_model_url=None, progress=gr.Progress()):
627
- ebook_file_path = ebook_file if isinstance(ebook_file, str) else ebook_file.name
628
- target_voice = target_voice_file if isinstance(target_voice_file, str) else target_voice_file.name if target_voice_file else None
629
  custom_model = None
630
 
631
 
632
-
633
  working_files = os.path.join(".", "Working_files", "temp_ebook")
634
  full_folder_working_files = os.path.join(".", "Working_files")
635
  chapters_directory = os.path.join(".", "Working_files", "temp_ebook")
 
624
 
625
  # Define the functions to be used in the Gradio interface
626
  def convert_ebook_to_audio(ebook_file, target_voice_file, language, use_custom_model, custom_model_file, custom_config_file, custom_vocab_file, custom_model_url=None, progress=gr.Progress()):
627
+ ebook_file_path = ebook_file.name
628
+ target_voice = target_voice_file.name if target_voice_file else None
629
  custom_model = None
630
 
631
 
 
632
  working_files = os.path.join(".", "Working_files", "temp_ebook")
633
  full_folder_working_files = os.path.join(".", "Working_files")
634
  chapters_directory = os.path.join(".", "Working_files", "temp_ebook")