Spaces:
Sleeping
Sleeping
CanYing0913
commited on
Commit
·
48f0069
1
Parent(s):
55c7989
Update SRT.py
Browse filesFormer-commit-id: f2097dcb2e2eacfbc3f2caf7aa85b918e194c0df
SRT.py
CHANGED
@@ -111,7 +111,7 @@ class SRT_script():
|
|
111 |
@classmethod
|
112 |
def parse_from_srt_file(cls, path: str):
|
113 |
with open(path, 'r', encoding="utf-8") as f:
|
114 |
-
script_lines =
|
115 |
|
116 |
segments = []
|
117 |
for i in range(len(script_lines)):
|
|
|
111 |
@classmethod
|
112 |
def parse_from_srt_file(cls, path: str):
|
113 |
with open(path, 'r', encoding="utf-8") as f:
|
114 |
+
script_lines = [line.rstrip() for line in f.readlines()]
|
115 |
|
116 |
segments = []
|
117 |
for i in range(len(script_lines)):
|