Spaces:
Sleeping
Sleeping
worldqwq
commited on
Commit
·
2f9051f
1
Parent(s):
0b15a1d
Optimized srt input support
Browse filesFormer-commit-id: e66a72b5170100bbb290ccc0ca3e6002337b67ca
- pipeline.py +4 -2
pipeline.py
CHANGED
@@ -195,8 +195,10 @@ if os.path.exists(zh_file):
|
|
195 |
pass
|
196 |
count += 1
|
197 |
segidx = int(count/4)+1
|
198 |
-
|
199 |
-
|
|
|
|
|
200 |
x = f1.readlines()
|
201 |
#print(len(x))
|
202 |
if count >= len(x):
|
|
|
195 |
pass
|
196 |
count += 1
|
197 |
segidx = int(count/4)+1
|
198 |
+
en_file = "{}/{}/{}_en.srt".format(RESULT_PATH, VIDEO_NAME, VIDEO_NAME)
|
199 |
+
if args.srt_file is not None:
|
200 |
+
en_file = args.srt_file
|
201 |
+
with open(en_file, "r") as f1, open(temp_file, "a") as f2:
|
202 |
x = f1.readlines()
|
203 |
#print(len(x))
|
204 |
if count >= len(x):
|