Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -28,8 +28,7 @@ with open('config.json') as config_file:
|
|
28 |
with open("config2.json", "r") as file:
|
29 |
config2 = json.load(file)
|
30 |
|
31 |
-
|
32 |
-
PERSIST_CODE_DIRECTORY =config["persist_code_directory"]
|
33 |
CHUNK_SIZE = config["chunk_size"]
|
34 |
CHUNK_OVERLAP = config["chunk_overlap"]
|
35 |
EMBEDDING_MODEL_NAME = config["embedding_model"]
|
@@ -151,7 +150,7 @@ def initialize():
|
|
151 |
print(f"Total number of code_chunks: {len(code_chunks)}")
|
152 |
print(f"Total number of doc_chunks: {len(doc_chunks)}")
|
153 |
|
154 |
-
vector_store = embed_documents_into_vectorstore(doc_chunks + code_chunks, EMBEDDING_MODEL_NAME,
|
155 |
llm = get_groq_llm(LLM_MODEL_NAME, LLM_TEMPERATURE, GROQ_API_KEY)
|
156 |
|
157 |
from langchain_community.document_loaders import TextLoader
|
|
|
28 |
with open("config2.json", "r") as file:
|
29 |
config2 = json.load(file)
|
30 |
|
31 |
+
VECTORSTORE_DIRECTORY = config["vectorstore_directory"]
|
|
|
32 |
CHUNK_SIZE = config["chunk_size"]
|
33 |
CHUNK_OVERLAP = config["chunk_overlap"]
|
34 |
EMBEDDING_MODEL_NAME = config["embedding_model"]
|
|
|
150 |
print(f"Total number of code_chunks: {len(code_chunks)}")
|
151 |
print(f"Total number of doc_chunks: {len(doc_chunks)}")
|
152 |
|
153 |
+
vector_store = embed_documents_into_vectorstore(doc_chunks + code_chunks, EMBEDDING_MODEL_NAME, VECTORSTORE_DIRECTORY)
|
154 |
llm = get_groq_llm(LLM_MODEL_NAME, LLM_TEMPERATURE, GROQ_API_KEY)
|
155 |
|
156 |
from langchain_community.document_loaders import TextLoader
|