Spaces:
Runtime error
Runtime error
Kiril
commited on
Commit
·
0906763
1
Parent(s):
254fe01
RAG with feedback
Browse files
app.py
CHANGED
@@ -51,6 +51,8 @@ def process_pdfs(pdf_storage_path: str):
|
|
51 |
is_separator_regex=False,
|
52 |
)
|
53 |
docs = recursive_text_splitter.split_documents(documents)
|
|
|
|
|
54 |
|
55 |
doc_search = Chroma.from_documents(docs, embeddings_model)
|
56 |
|
|
|
51 |
is_separator_regex=False,
|
52 |
)
|
53 |
docs = recursive_text_splitter.split_documents(documents)
|
54 |
+
if not docs:
|
55 |
+
raise ValueError("No documents found in the specified directory.")
|
56 |
|
57 |
doc_search = Chroma.from_documents(docs, embeddings_model)
|
58 |
|