LAP-DEV commited on
Commit
5d68dd1
·
verified ·
1 Parent(s): 45015f1

Update modules/whisper/whisper_base.py

Browse files
Files changed (1) hide show
  1. modules/whisper/whisper_base.py +2 -2
modules/whisper/whisper_base.py CHANGED
@@ -419,7 +419,7 @@ class WhisperBase(ABC):
419
  if translate_output: title_line += f'\nTranslation:\t{info["translation"]} (Handled by Facebook NLLB)'
420
  title_line += "■"
421
 
422
- temp_subtitle = info["subtitle"]
423
  temp_subtitle = temp_subtitle.replace("\t","□")
424
  temp_subtitle = temp_subtitle.replace("\n","■")
425
  total_result += temp_subtitle
@@ -431,7 +431,7 @@ class WhisperBase(ABC):
431
  total_info = f"Processed {file_count} {'file' if file_count == 1 else 'files'} in {self.format_time((time_end-time_start).total_seconds())}"
432
 
433
  print("data to process: "+total_result)
434
- result_str = self.transform_text_to_list(total_result.rstrip("\n"),"□","■") #Transform to gr.Dataframe format
435
  result_file_path = [info['path'] for info in files_to_download.values()]
436
 
437
  return [result_str,result_file_path,total_info]
 
419
  if translate_output: title_line += f'\nTranslation:\t{info["translation"]} (Handled by Facebook NLLB)'
420
  title_line += "■"
421
 
422
+ temp_subtitle = info["subtitle"].rstrip("\n")
423
  temp_subtitle = temp_subtitle.replace("\t","□")
424
  temp_subtitle = temp_subtitle.replace("\n","■")
425
  total_result += temp_subtitle
 
431
  total_info = f"Processed {file_count} {'file' if file_count == 1 else 'files'} in {self.format_time((time_end-time_start).total_seconds())}"
432
 
433
  print("data to process: "+total_result)
434
+ result_str = self.transform_text_to_list(total_result,"□","■") #Transform to gr.Dataframe format
435
  result_file_path = [info['path'] for info in files_to_download.values()]
436
 
437
  return [result_str,result_file_path,total_info]