Update app.py
Browse files
app.py
CHANGED
@@ -62,7 +62,14 @@ def augment_llm_with_docs(files):
|
|
62 |
|
63 |
persist_directory_openai = 'docs/chroma/openai/'
|
64 |
#!rm -rf ./docs/chroma/openai
|
65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
openai_embeddings = OpenAIEmbeddings()
|
67 |
|
68 |
# Finally we make our Index (i.e. Vector Database) using chromadb and the open ai embeddings LLM
|
|
|
62 |
|
63 |
persist_directory_openai = 'docs/chroma/openai/'
|
64 |
#!rm -rf ./docs/chroma/openai
|
65 |
+
|
66 |
+
try:
|
67 |
+
shutil.rmtree(persist_directory_openai)
|
68 |
+
print("Directory removed successfully")
|
69 |
+
except FileNotFoundError:
|
70 |
+
print("/docs/chroma/openai directory does not exist")
|
71 |
+
continue
|
72 |
+
|
73 |
openai_embeddings = OpenAIEmbeddings()
|
74 |
|
75 |
# Finally we make our Index (i.e. Vector Database) using chromadb and the open ai embeddings LLM
|