Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -282,7 +282,7 @@ def split_into_chunks(texts, references, chunk_size, chunk_overlap):
|
|
| 282 |
return chunks
|
| 283 |
|
| 284 |
# Setup Vectorstore
|
| 285 |
-
def setup_vectorstore(chunks, model_name):
|
| 286 |
print("Start setup_vectorstore_function")
|
| 287 |
embedding_model = HuggingFaceEmbeddings(model_name=model_name)
|
| 288 |
|
|
@@ -386,7 +386,7 @@ def initialize():
|
|
| 386 |
#print(f"Total number of code_chunks: {len(code_chunks)}")
|
| 387 |
print(f"Total number of doc_chunks: {len(doc_chunks)}")
|
| 388 |
|
| 389 |
-
docstore = setup_vectorstore(doc_chunks, EMBEDDING_MODEL_NAME)
|
| 390 |
#codestore = setup_vectorstore(code_chunks, EMBEDDING_MODEL_NAME, PERSIST_CODE_DIRECTORY)
|
| 391 |
|
| 392 |
#llm = setup_llm(LLM_MODEL_NAME, LLM_TEMPERATURE, GROQ_API_KEY)
|
|
|
|
| 282 |
return chunks
|
| 283 |
|
| 284 |
# Setup Vectorstore
|
| 285 |
+
def setup_vectorstore(chunks, model_name, persist_directory):
|
| 286 |
print("Start setup_vectorstore_function")
|
| 287 |
embedding_model = HuggingFaceEmbeddings(model_name=model_name)
|
| 288 |
|
|
|
|
| 386 |
#print(f"Total number of code_chunks: {len(code_chunks)}")
|
| 387 |
print(f"Total number of doc_chunks: {len(doc_chunks)}")
|
| 388 |
|
| 389 |
+
docstore = setup_vectorstore(doc_chunks, EMBEDDING_MODEL_NAME, PERSIST_DOC_DIRECTORY)
|
| 390 |
#codestore = setup_vectorstore(code_chunks, EMBEDDING_MODEL_NAME, PERSIST_CODE_DIRECTORY)
|
| 391 |
|
| 392 |
#llm = setup_llm(LLM_MODEL_NAME, LLM_TEMPERATURE, GROQ_API_KEY)
|