Update modules/whisper/whisper_base.py
Browse files
modules/whisper/whisper_base.py
CHANGED
@@ -418,14 +418,17 @@ class WhisperBase(ABC):
|
|
418 |
title_line += f'\n{tabbed_space}Language:\t{info["lang"]} (probability {info["lang_prob"]}%)'
|
419 |
if params.is_translate: title_line += f'\n{tabbed_space}Translation:\t{info["transcription"]} (Handled by OpenAI Whisper)'
|
420 |
if translate_output: title_line += f'\n{tabbed_space}Translation:\t{info["translation"]} (Handled by Facebook NLLB)'
|
421 |
-
|
422 |
-
|
423 |
for temp_file in files_to_download.items():
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
|
|
|
|
|
|
429 |
|
430 |
total_result += title_line+(((info["subtitle"].rstrip("\n")).replace("\t","#TAB#")).replace("\n","#NEWLINE#"))
|
431 |
total_time += info["time_for_task"]
|
|
|
418 |
title_line += f'\n{tabbed_space}Language:\t{info["lang"]} (probability {info["lang_prob"]}%)'
|
419 |
if params.is_translate: title_line += f'\n{tabbed_space}Translation:\t{info["transcription"]} (Handled by OpenAI Whisper)'
|
420 |
if translate_output: title_line += f'\n{tabbed_space}Translation:\t{info["translation"]} (Handled by Facebook NLLB)'
|
421 |
+
|
422 |
+
html_code = ""
|
423 |
for temp_file in files_to_download.items():
|
424 |
+
dl_file = str(temp_file[0].split("_")[0])
|
425 |
+
dl_type = str(temp_file[0].split("_")[1])
|
426 |
+
dl_link = str((temp_file[1])["path"])
|
427 |
+
if dl_file == file_name:
|
428 |
+
if html_code != "": html_code+=" "
|
429 |
+
html_code += "<a href=''"+dl_link+"'>"+dl_type+"</a>"
|
430 |
+
|
431 |
+
title_line += "#TAB#"+html_code+"#NEWLINE#"
|
432 |
|
433 |
total_result += title_line+(((info["subtitle"].rstrip("\n")).replace("\t","#TAB#")).replace("\n","#NEWLINE#"))
|
434 |
total_time += info["time_for_task"]
|