Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,7 +19,7 @@ from langchain.schema import AIMessage, HumanMessage, SystemMessage
|
|
| 19 |
embeddings = OpenAIEmbeddings()
|
| 20 |
|
| 21 |
# Loads database from persisted directory
|
| 22 |
-
db_directory = "
|
| 23 |
db = Chroma(persist_directory=db_directory, embedding_function=embeddings)
|
| 24 |
|
| 25 |
# This is code that retrieves relevant documents based on a similarity search (in this case, it grabs the top 2 relevant documents or chunks)
|
|
@@ -53,7 +53,7 @@ def get_full_context(input):
|
|
| 53 |
retrieved_documents = retriever.get_relevant_documents(input)
|
| 54 |
context = "" # Initialize an empty string
|
| 55 |
|
| 56 |
-
file_path = "
|
| 57 |
data = pd.read_csv(file_path)
|
| 58 |
for doc in retrieved_documents:
|
| 59 |
index = doc.metadata['index']
|
|
|
|
| 19 |
embeddings = OpenAIEmbeddings()
|
| 20 |
|
| 21 |
# Loads database from persisted directory
|
| 22 |
+
db_directory = "./docs/2023_12_06_chroma_db"
|
| 23 |
db = Chroma(persist_directory=db_directory, embedding_function=embeddings)
|
| 24 |
|
| 25 |
# This is code that retrieves relevant documents based on a similarity search (in this case, it grabs the top 2 relevant documents or chunks)
|
|
|
|
| 53 |
retrieved_documents = retriever.get_relevant_documents(input)
|
| 54 |
context = "" # Initialize an empty string
|
| 55 |
|
| 56 |
+
file_path = "./docs/Troubleshooting_Table.csv"
|
| 57 |
data = pd.read_csv(file_path)
|
| 58 |
for doc in retrieved_documents:
|
| 59 |
index = doc.metadata['index']
|