EUNSEO56 commited on
Commit
94dbbcd
·
1 Parent(s): 8c1c8a4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -65,6 +65,8 @@ def get_text_chunks(documents):
65
  )
66
 
67
  documents = text_splitter.split_documents(documents) # 문서들을 청크로 나눕니다
 
 
68
  return documents # 나눈 청크를 반환합니다.
69
 
70
 
 
65
  )
66
 
67
  documents = text_splitter.split_documents(documents) # 문서들을 청크로 나눕니다
68
+ if not documents:
69
+ raise ValueError("업로드된 문서가 없거나 모든 문서가 비어 있습니다.")
70
  return documents # 나눈 청크를 반환합니다.
71
 
72