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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -139,8 +139,7 @@ def create_vector_db(final_items):
139
  global db
140
  client = chromadb.Client()
141
  collection_name = "BioModelsRAG"
142
- print(f"Collection '{collection_name}' already exists.")
143
- db = client.get_collection(name=collection_name, embedding_function="all-MiniLM-L6-v2")
144
 
145
  # Initialize Llama model
146
  llm = Llama.from_pretrained(
 
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(