Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -130,7 +130,7 @@ def create_chroma_instance(directory):
|
|
130 |
return Chroma(persist_directory=directory, embedding_function=OpenAIEmbeddings())
|
131 |
|
132 |
|
133 |
-
vectordb = Chroma(persist_directory="./
|
134 |
|
135 |
|
136 |
|
@@ -319,21 +319,21 @@ def chat_page():
|
|
319 |
|
320 |
st.write("\n")
|
321 |
|
322 |
-
# List of available databases
|
323 |
-
db_options = ["ChromaDB1", "ChromaDB2", "ChromaDB3"]
|
324 |
|
325 |
|
326 |
# Define the dropdown options and corresponding directories
|
327 |
db_options = {
|
328 |
-
"ChromaDB -
|
329 |
-
"ChromaDB -
|
|
|
|
|
330 |
}
|
331 |
|
332 |
|
333 |
|
334 |
st.sidebar.header("Select Chroma Database")
|
335 |
# Sidebar dropdown to select the database, with ChromaDB1 (./data) as the default
|
336 |
-
selected_db = st.sidebar.selectbox("**Select Chroma Database**", list(db_options.keys()), index=list(db_options.keys()).index("ChromaDB -
|
337 |
|
338 |
|
339 |
# Get the corresponding directory for the selected option
|
|
|
130 |
return Chroma(persist_directory=directory, embedding_function=OpenAIEmbeddings())
|
131 |
|
132 |
|
133 |
+
vectordb = Chroma(persist_directory="./db_recursive_word", embedding_function=OpenAIEmbeddings())
|
134 |
|
135 |
|
136 |
|
|
|
319 |
|
320 |
st.write("\n")
|
321 |
|
|
|
|
|
322 |
|
323 |
|
324 |
# Define the dropdown options and corresponding directories
|
325 |
db_options = {
|
326 |
+
"ChromaDB - Recursive Word": "./db_recursive_word",
|
327 |
+
"ChromaDB - Recursive Markdown": "./db_recursive_md",
|
328 |
+
"ChromaDB - spaCy Word": "./db_spacy_word",
|
329 |
+
"ChromaDB - Consumer Recursive": "./db_consumer"
|
330 |
}
|
331 |
|
332 |
|
333 |
|
334 |
st.sidebar.header("Select Chroma Database")
|
335 |
# Sidebar dropdown to select the database, with ChromaDB1 (./data) as the default
|
336 |
+
selected_db = st.sidebar.selectbox("**Select Chroma Database**", list(db_options.keys()), index=list(db_options.keys()).index("ChromaDB - Recursive Word"))
|
337 |
|
338 |
|
339 |
# Get the corresponding directory for the selected option
|