SPACERUNNER99 commited on
Commit
462a507
·
verified ·
1 Parent(s): 8fc9419

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -283,10 +283,10 @@ def read_srt_file(file_path):
283
  print(f"An error occurred: {e}")
284
 
285
  def clean_text(text):
286
- # Remove 'srt ' from the start
287
  text = re.sub(r'^srt ', '', text, flags=re.MULTILINE)
288
  # Remove ''' from the start and end
289
- text = re.sub(r"^'''|'''$", '', text)
290
  return text
291
 
292
  def enhance_text(api_key, text, google):
 
283
  print(f"An error occurred: {e}")
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"^```|```$", '', text)
290
  return text
291
 
292
  def enhance_text(api_key, text, google):