Update app.py
Browse files
app.py
CHANGED
@@ -139,7 +139,9 @@ def create_vector_db(final_items):
|
|
139 |
global db
|
140 |
client = chromadb.Client()
|
141 |
collection_name = "BioModelsRAG"
|
142 |
-
|
|
|
|
|
143 |
|
144 |
# Initialize Llama model
|
145 |
llm = Llama.from_pretrained(
|
|
|
139 |
global db
|
140 |
client = chromadb.Client()
|
141 |
collection_name = "BioModelsRAG"
|
142 |
+
embedding_function = embedding_functions.SentenceTransformerEmbeddingFunction(model_name="all-MiniLM-L6-v2")
|
143 |
+
|
144 |
+
db = client.get_or_create_collection(name=collection_name, embedding_function = embedding_function)
|
145 |
|
146 |
# Initialize Llama model
|
147 |
llm = Llama.from_pretrained(
|