Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
105 |
-
|
|
|
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.
|
|
|
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)
|