deepkansara-123 commited on
Commit
f28b215
·
verified ·
1 Parent(s): a10691f

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +5 -1
main.py CHANGED
@@ -227,5 +227,9 @@ class Video_Summarize:
227
 
228
  top = sorted(all_candidates, key=lambda x: x[0], reverse=True)[:max(n_line, 3)]
229
  top = sorted(top, key=lambda x: int(x[1][1:3]) * 60 + int(x[1][4:6]))
230
- return [f"{ts} {txt.replace('\"', '')}" for _, ts, txt in top]
 
 
 
 
231
 
 
227
 
228
  top = sorted(all_candidates, key=lambda x: x[0], reverse=True)[:max(n_line, 3)]
229
  top = sorted(top, key=lambda x: int(x[1][1:3]) * 60 + int(x[1][4:6]))
230
+ cleaned = []
231
+ for _, ts, txt in top:
232
+ cleaned_text = txt.replace('"', '')
233
+ cleaned.append(f"{ts} {cleaned_text}")
234
+ return cleaned
235