Spaces:
Running
Running
yash001010
commited on
Commit
•
93d2c31
1
Parent(s):
e741e3b
Update app.py
Browse files
app.py
CHANGED
@@ -60,12 +60,17 @@ try:
|
|
60 |
st.success("Directory created!")
|
61 |
|
62 |
try:
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
except Exception as e:
|
68 |
st.error(f"Error loading vector store: {e}")
|
|
|
|
|
|
|
|
|
|
|
69 |
|
70 |
retriever = vector_store.as_retriever(search_kwargs={'k': 1})
|
71 |
|
|
|
60 |
st.success("Directory created!")
|
61 |
|
62 |
try:
|
63 |
+
vector_store = Chroma(
|
64 |
+
persist_directory=persist_directory,
|
65 |
+
embedding_function=embeddings
|
66 |
+
)
|
67 |
except Exception as e:
|
68 |
st.error(f"Error loading vector store: {e}")
|
69 |
+
|
70 |
+
# vector_store = Chroma(
|
71 |
+
# persist_directory=persist_directory,
|
72 |
+
# embedding_function=embeddings
|
73 |
+
# )
|
74 |
|
75 |
retriever = vector_store.as_retriever(search_kwargs={'k': 1})
|
76 |
|