Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -363,9 +363,14 @@ def initialize():
|
|
| 363 |
print(f"Total number of code_chunks: {len(kadiAPY_code_chunks)}")
|
| 364 |
print(f"Total number of doc_chunks: {len(kadiAPY_doc_chunks)}")
|
| 365 |
|
| 366 |
-
docstore = embed_documents_into_vectorstore(kadiAPY_code_chunks, EMBEDDING_MODEL_NAME, PERSIST_DOC_DIRECTORY)
|
| 367 |
-
codestore = embed_documents_into_vectorstore(kadiAPY_doc_chunks, EMBEDDING_MODEL_NAME, PERSIST_CODE_DIRECTORY)
|
| 368 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 369 |
llm = setup_llm(LLM_MODEL_NAME, LLM_TEMPERATURE, GROQ_API_KEY)
|
| 370 |
|
| 371 |
|
|
|
|
| 363 |
print(f"Total number of code_chunks: {len(kadiAPY_code_chunks)}")
|
| 364 |
print(f"Total number of doc_chunks: {len(kadiAPY_doc_chunks)}")
|
| 365 |
|
| 366 |
+
#docstore = embed_documents_into_vectorstore(kadiAPY_code_chunks, EMBEDDING_MODEL_NAME, PERSIST_DOC_DIRECTORY)
|
| 367 |
+
#codestore = embed_documents_into_vectorstore(kadiAPY_doc_chunks, EMBEDDING_MODEL_NAME, PERSIST_CODE_DIRECTORY)
|
| 368 |
+
|
| 369 |
+
embed_documents_into_vectorstore(
|
| 370 |
+
chunks=kadiAPY_code_chunks + kadiAPY_doc_chunks,
|
| 371 |
+
model_name= EMBEDDING_MODEL_NAME, # Correcting the variable name
|
| 372 |
+
persist_directory= PERSIST_DOC_DIRECTORY # Correcting the variable name
|
| 373 |
+
)
|
| 374 |
llm = setup_llm(LLM_MODEL_NAME, LLM_TEMPERATURE, GROQ_API_KEY)
|
| 375 |
|
| 376 |
|