Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -50,11 +50,11 @@ def vector_embedding():
|
|
50 |
st.session_state.embeddings = GoogleGenerativeAIEmbeddings(model="models/embedding-001")
|
51 |
|
52 |
# Load documents
|
53 |
-
st.session_state.loader = PyPDFDirectoryLoader("./
|
54 |
st.session_state.docs = st.session_state.loader.load()
|
55 |
|
56 |
if not st.session_state.docs:
|
57 |
-
st.error("No documents found in the directory './
|
58 |
return
|
59 |
|
60 |
# Split documents into chunks
|
|
|
50 |
st.session_state.embeddings = GoogleGenerativeAIEmbeddings(model="models/embedding-001")
|
51 |
|
52 |
# Load documents
|
53 |
+
st.session_state.loader = PyPDFDirectoryLoader("./new") # Data ingestion
|
54 |
st.session_state.docs = st.session_state.loader.load()
|
55 |
|
56 |
if not st.session_state.docs:
|
57 |
+
st.error("No documents found in the directory './new'. Please add PDFs.")
|
58 |
return
|
59 |
|
60 |
# Split documents into chunks
|