Spaces:
Runtime error
Runtime error
alekzan commited on
Commit ·
f5103c0
1
Parent(s): fccb071
Add app.py more
Browse files
app.py
CHANGED
|
@@ -42,7 +42,7 @@ llama_3_2 = "llama-3.2-90b-vision-preview"
|
|
| 42 |
|
| 43 |
def process_docs_and_get_retriever(
|
| 44 |
doc_path: str,
|
| 45 |
-
persist_directory="/
|
| 46 |
collection_name: str = "user_data",
|
| 47 |
k: int = 4,
|
| 48 |
):
|
|
@@ -119,7 +119,7 @@ def process_text_as_retriever(text: str):
|
|
| 119 |
A retriever object for querying the vector store.
|
| 120 |
"""
|
| 121 |
# Hard-coded parameters
|
| 122 |
-
persist_directory = "/
|
| 123 |
collection_name = "user_data"
|
| 124 |
k = 4
|
| 125 |
|
|
@@ -161,7 +161,7 @@ def process_text_as_retriever(text: str):
|
|
| 161 |
|
| 162 |
|
| 163 |
def recreate_retriever(
|
| 164 |
-
persist_directory: str = "/
|
| 165 |
collection_name: str = "user_data",
|
| 166 |
):
|
| 167 |
"""
|
|
@@ -178,7 +178,7 @@ def recreate_retriever(
|
|
| 178 |
|
| 179 |
|
| 180 |
# Check if the path exists
|
| 181 |
-
chroma_db_path = "/
|
| 182 |
|
| 183 |
if not os.path.exists(chroma_db_path):
|
| 184 |
doc_path = "./data/docs/goldmine.docx"
|
|
|
|
| 42 |
|
| 43 |
def process_docs_and_get_retriever(
|
| 44 |
doc_path: str,
|
| 45 |
+
persist_directory="/data/chroma_langchain_db",
|
| 46 |
collection_name: str = "user_data",
|
| 47 |
k: int = 4,
|
| 48 |
):
|
|
|
|
| 119 |
A retriever object for querying the vector store.
|
| 120 |
"""
|
| 121 |
# Hard-coded parameters
|
| 122 |
+
persist_directory = "/data/chroma_langchain_db"
|
| 123 |
collection_name = "user_data"
|
| 124 |
k = 4
|
| 125 |
|
|
|
|
| 161 |
|
| 162 |
|
| 163 |
def recreate_retriever(
|
| 164 |
+
persist_directory: str = "/data/chroma_langchain_db",
|
| 165 |
collection_name: str = "user_data",
|
| 166 |
):
|
| 167 |
"""
|
|
|
|
| 178 |
|
| 179 |
|
| 180 |
# Check if the path exists
|
| 181 |
+
chroma_db_path = "/data/chroma_langchain_db"
|
| 182 |
|
| 183 |
if not os.path.exists(chroma_db_path):
|
| 184 |
doc_path = "./data/docs/goldmine.docx"
|