TheBobBob commited on
Commit
e09d134
·
verified ·
1 Parent(s): 14f9e18

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
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
- db = client.get_or_create_collection(name=collection_name, embedding_function = "all-MiniLM-L6-v2")
 
 
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(