TheBobBob commited on
Commit
abbf843
·
verified ·
1 Parent(s): afcb2da

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -134,8 +134,7 @@ def split_biomodels(antimony_file_path):
134
 
135
  import chromadb
136
 
137
- @st.cache_resource
138
- def create_vector_db(_final_items):
139
  global db
140
  client = chromadb.Client()
141
  collection_name = "BioModelsRAG"
@@ -291,12 +290,10 @@ def streamlit_app(db):
291
 
292
  convert_sbml_to_antimony(model_file_path, antimony_file_path)
293
 
294
- items = split_biomodels(antimony_file_path)
295
  if not items: # Check if 'items' is empty, not 'final_items'
296
  st.write("No content found in the biomodel.")
297
  continue
298
-
299
- final_items.extend(items)
300
 
301
  db = create_vector_db(final_items) # Create or update the database with final items
302
 
 
134
 
135
  import chromadb
136
 
137
+ def create_vector_db(final_items):
 
138
  global db
139
  client = chromadb.Client()
140
  collection_name = "BioModelsRAG"
 
290
 
291
  convert_sbml_to_antimony(model_file_path, antimony_file_path)
292
 
293
+ final_items = split_biomodels(antimony_file_path)
294
  if not items: # Check if 'items' is empty, not 'final_items'
295
  st.write("No content found in the biomodel.")
296
  continue
 
 
297
 
298
  db = create_vector_db(final_items) # Create or update the database with final items
299