Update app.py
Browse files
app.py
CHANGED
@@ -284,9 +284,9 @@ def read_srt_file(file_path):
|
|
284 |
|
285 |
def clean_text(text):
|
286 |
# Remove 'srt ' from the start of each line
|
287 |
-
#text = re.sub(r'^srt ', '', text, flags=re.MULTILINE)
|
288 |
# Remove ''' from the start and end
|
289 |
-
text = re.sub(r"
|
|
|
290 |
return text
|
291 |
|
292 |
def enhance_text(api_key, text, google):
|
|
|
284 |
|
285 |
def clean_text(text):
|
286 |
# Remove 'srt ' from the start of each line
|
|
|
287 |
# Remove ''' from the start and end
|
288 |
+
text = re.sub(r"^```|```$", '', text)
|
289 |
+
text = re.sub(r'^srt', '', text, flags=re.MULTILINE)
|
290 |
return text
|
291 |
|
292 |
def enhance_text(api_key, text, google):
|