Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
import os
|
2 |
import requests
|
3 |
import tellurium as te
|
@@ -7,7 +8,7 @@ import chromadb
|
|
7 |
from langchain_text_splitters import RecursiveCharacterTextSplitter
|
8 |
|
9 |
# Constants and global variables
|
10 |
-
GITHUB_OWNER = "
|
11 |
GITHUB_REPO_CACHE = "BiomodelsCache"
|
12 |
BIOMODELS_JSON_DB_PATH = "src/cached_biomodels.json"
|
13 |
LOCAL_DOWNLOAD_DIR = tempfile.mkdtemp()
|
@@ -142,7 +143,7 @@ def create_vector_db(final_items):
|
|
142 |
embedding_function = embedding_functions.SentenceTransformerEmbeddingFunction(model_name="all-MiniLM-L6-v2")
|
143 |
|
144 |
# Initialize the database
|
145 |
-
db = client.get_or_create_collection(name=collection_name
|
146 |
if db is None:
|
147 |
print("Database has not been grabbed.")
|
148 |
documents_to_add = []
|
|
|
1 |
+
#not being added to db properly, that is the problem
|
2 |
import os
|
3 |
import requests
|
4 |
import tellurium as te
|
|
|
8 |
from langchain_text_splitters import RecursiveCharacterTextSplitter
|
9 |
|
10 |
# Constants and global variables
|
11 |
+
GITHUB_OWNER = "TheBobBob"
|
12 |
GITHUB_REPO_CACHE = "BiomodelsCache"
|
13 |
BIOMODELS_JSON_DB_PATH = "src/cached_biomodels.json"
|
14 |
LOCAL_DOWNLOAD_DIR = tempfile.mkdtemp()
|
|
|
143 |
embedding_function = embedding_functions.SentenceTransformerEmbeddingFunction(model_name="all-MiniLM-L6-v2")
|
144 |
|
145 |
# Initialize the database
|
146 |
+
db = client.get_or_create_collection(name=collection_name)
|
147 |
if db is None:
|
148 |
print("Database has not been grabbed.")
|
149 |
documents_to_add = []
|