LAP-DEV commited on
Commit
93bc32c
·
verified ·
1 Parent(s): 09368e9

Update modules/whisper/whisper_base.py

Browse files
Files changed (1) hide show
  1. modules/whisper/whisper_base.py +8 -4
modules/whisper/whisper_base.py CHANGED
@@ -425,12 +425,16 @@ class WhisperBase(ABC):
425
 
426
  time_end = datetime.now()
427
  total_info = f"Processed {file_count} {'file' if file_count == 1 else 'files'} in {self.format_time((time_end-time_start).total_seconds())}"
428
- #total_info += f"Total processing time:\t{self.format_time((time_end-time_start).total_seconds())}"
429
-
430
- result_str = self.transform_text_to_list(total_result) #Transform to gr.Dataframe format
431
  result_file_path = [info['path'] for info in files_to_download.values()]
 
432
 
433
- return [result_str,result_file_path,total_info]
 
 
 
 
 
 
434
 
435
  except Exception as e:
436
  print(f"Error transcribing file: {e}")
 
425
 
426
  time_end = datetime.now()
427
  total_info = f"Processed {file_count} {'file' if file_count == 1 else 'files'} in {self.format_time((time_end-time_start).total_seconds())}"
 
 
 
428
  result_file_path = [info['path'] for info in files_to_download.values()]
429
+ #total_info += f"Total processing time:\t{self.format_time((time_end-time_start).total_seconds())}"
430
 
431
+ result_str = self.transform_text_to_list(total_result) #Transform to gr.Dataframe format
432
+ new_headers = ["New Header 1", "New Header 2"]
433
+ new_data_rows = [[1, 2], [3, 4]]
434
+ updated_data = {"headers": new_headers, "data": new_data_rows}
435
+
436
+ return [(gr.update(value=updated_data)),result_file_path,total_info]
437
+ #return [result_str,result_file_path,total_info]
438
 
439
  except Exception as e:
440
  print(f"Error transcribing file: {e}")