From 6d2b7821365be5d990e6850dca25caad1eeb7994 Mon Sep 17 00:00:00 2001 From: GyeongSik Son <47748085+Son-GyeongSik@users.noreply.github.com> Date: Mon, 13 Nov 2023 19:18:29 +0900 Subject: [PATCH] Hotfix : chunk divide out of index error fix --- app/summary/summaryv2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/summary/summaryv2.py b/app/summary/summaryv2.py index ba40863..2fa4ce4 100644 --- a/app/summary/summaryv2.py +++ b/app/summary/summaryv2.py @@ -47,7 +47,7 @@ def divide_chunk(scripts: dict): else: chunk_text += script['text'] - if len(chunk_text) < 1000: + if len(chunk_text) < 1000 and len(chunks) > 0: chunks[-1] += chunk_text else: time_stamps.append(time_stamp)