BaRiDo commited on
Commit
2f16af2
·
verified ·
1 Parent(s): dab5624

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -101,8 +101,9 @@ from ibm_watsonx_ai.foundation_models import ModelInference
101
  from ibm_watsonx_ai.client import APIClient
102
 
103
  if "client" not in st.session_state:
104
- wml_credentials = get_credentials()
105
- st.session_state.client = APIClient(credentials=wml_credentials, project_id=project_id)
 
106
 
107
  vector_index_id = VECTOR_DB
108
  vector_index_details = st.session_state.client.data_assets.get_details(vector_index_id)
@@ -194,7 +195,8 @@ def hydrate_chromadb():
194
  return collection
195
 
196
  if "chroma_collection" not in st.session_state:
197
- st.session_state.chroma_collection = hydrate_chromadb()
 
198
 
199
  def proximity_search( question ):
200
  query_vectors = emb.embed_query(question)
 
101
  from ibm_watsonx_ai.client import APIClient
102
 
103
  if "client" not in st.session_state:
104
+ with st.spinner("⏳ Waking the wizard ..."):
105
+ wml_credentials = get_credentials()
106
+ st.session_state.client = APIClient(credentials=wml_credentials, project_id=project_id)
107
 
108
  vector_index_id = VECTOR_DB
109
  vector_index_details = st.session_state.client.data_assets.get_details(vector_index_id)
 
195
  return collection
196
 
197
  if "chroma_collection" not in st.session_state:
198
+ with st.spinner("⏳ Dusting off the scroll books ..."):
199
+ st.session_state.chroma_collection = hydrate_chromadb()
200
 
201
  def proximity_search( question ):
202
  query_vectors = emb.embed_query(question)