TheBobBob commited on
Commit
a17e295
·
verified ·
1 Parent(s): 1a80de5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -159,7 +159,7 @@ def create_vector_db(final_items):
159
  item2 = str(item)
160
  item_id = f"id_{item2[:45].replace(' ', '_')}"
161
 
162
- item_id_already_created = db.get(item_id)
163
 
164
  if item_id_already_created is None: # If the ID does not exist
165
  # Generate the LLM prompt and output
@@ -261,7 +261,7 @@ def generate_response(db, query_text, previous_context):
261
 
262
  return full_response
263
 
264
- def streamlit_app():
265
  st.title("BioModelsRAG")
266
 
267
  search_str = st.text_input("Enter search query:")
 
159
  item2 = str(item)
160
  item_id = f"id_{item2[:45].replace(' ', '_')}"
161
 
162
+ item_id_already_created = db.get(item_id) #referenced db here, but it is already initialized?
163
 
164
  if item_id_already_created is None: # If the ID does not exist
165
  # Generate the LLM prompt and output
 
261
 
262
  return full_response
263
 
264
+ def streamlit_app(db):
265
  st.title("BioModelsRAG")
266
 
267
  search_str = st.text_input("Enter search query:")