MVPilgrim commited on
Commit
751e263
·
1 Parent(s): b8da9e5
Files changed (2) hide show
  1. .streamlit/config.toml +2 -1
  2. app.py +3 -4
.streamlit/config.toml CHANGED
@@ -6,4 +6,5 @@ textColor = "#ffffff"
6
  font="sans serif"
7
 
8
  [server]
9
- maxUploadSize = 200
 
 
6
  font="sans serif"
7
 
8
  [server]
9
+ maxUploadSize = 200
10
+ headless = true
app.py CHANGED
@@ -279,8 +279,9 @@ try:
279
 
280
  ###########################################################
281
  # Create document and chunks objects in the database.
282
- if 'wpCollectionLoaded' not in st.session_state:
283
  logger.info("#### Create db objects.")
 
284
  for i, className in enumerate(webpageDocNames):
285
  title = webpageTitles[i]
286
  logger.debug(f"## className, title: {className}, {title}")
@@ -311,9 +312,7 @@ try:
311
  }
312
  }
313
  )
314
- logger.info("#### Create chunk db objects exited.")
315
- st.session_state.wpCollectionLoaded = True
316
- st.session_state.wpChunksCollectionLoaded = True
317
  logger.info("#### db objects created.")
318
 
319
  #################################################################
 
279
 
280
  ###########################################################
281
  # Create document and chunks objects in the database.
282
+ if 'dbObjsCreated' not in st.session_state:
283
  logger.info("#### Create db objects.")
284
+ st.session_state.dbObjsCreated = True
285
  for i, className in enumerate(webpageDocNames):
286
  title = webpageTitles[i]
287
  logger.debug(f"## className, title: {className}, {title}")
 
312
  }
313
  }
314
  )
315
+ logger.info("#### Create chunk db objects created.")
 
 
316
  logger.info("#### db objects created.")
317
 
318
  #################################################################