Spaces:
Runtime error
Runtime error
Commit
·
4ea8cea
1
Parent(s):
f36ca6d
minor fixes
Browse files
set_up.py
CHANGED
@@ -29,7 +29,9 @@ def prepare_input(input_file, start_time, end_time, lang, model_size, use_summar
|
|
29 |
return [None, None, [None, None]]
|
30 |
|
31 |
current_input_file = input_file
|
|
|
32 |
start_time_for_adjustment = start_time
|
|
|
33 |
end_time_for_adjustment = end_time
|
34 |
|
35 |
print(f"SOURCE: {input_file}")
|
@@ -51,16 +53,16 @@ def prepare_input(input_file, start_time, end_time, lang, model_size, use_summar
|
|
51 |
|
52 |
# Add subtitle to video
|
53 |
progress(0.8, desc=ui_lang["progress_add_subtitle"])
|
54 |
-
add_subtitle_to_video(input_file, get_subtitle_file,
|
55 |
-
get_video_subtitle_file, start_time, end_time)
|
56 |
|
57 |
# Return video file link, transcribe string, transcribe.txt, subtitle.txt
|
58 |
transcribe_txt_list, _ = utils.read_transcribe_subtitle_file(False)
|
59 |
transcribe_txt = "\n".join(transcribe_txt_list)
|
60 |
return [
|
61 |
-
get_video_subtitle_file,
|
62 |
transcribe_txt,
|
63 |
-
[get_transcribe_file, get_subtitle_file]
|
64 |
]
|
65 |
|
66 |
|
|
|
29 |
return [None, None, [None, None]]
|
30 |
|
31 |
current_input_file = input_file
|
32 |
+
global start_time_for_adjustment
|
33 |
start_time_for_adjustment = start_time
|
34 |
+
global end_time_for_adjustment
|
35 |
end_time_for_adjustment = end_time
|
36 |
|
37 |
print(f"SOURCE: {input_file}")
|
|
|
53 |
|
54 |
# Add subtitle to video
|
55 |
progress(0.8, desc=ui_lang["progress_add_subtitle"])
|
56 |
+
add_subtitle_to_video(input_file, get_subtitle_file(),
|
57 |
+
get_video_subtitle_file(), start_time, end_time)
|
58 |
|
59 |
# Return video file link, transcribe string, transcribe.txt, subtitle.txt
|
60 |
transcribe_txt_list, _ = utils.read_transcribe_subtitle_file(False)
|
61 |
transcribe_txt = "\n".join(transcribe_txt_list)
|
62 |
return [
|
63 |
+
get_video_subtitle_file(),
|
64 |
transcribe_txt,
|
65 |
+
[get_transcribe_file(), get_subtitle_file()]
|
66 |
]
|
67 |
|
68 |
|