Spaces:
Sleeping
Sleeping
sarahselim18
commited on
Commit
·
ff75d61
1
Parent(s):
dd3e553
modified existing code
Browse files
app.py
CHANGED
@@ -193,13 +193,13 @@ def get_sorted_cosine_similarity(embeddings_metadata):
|
|
193 |
|
194 |
else:
|
195 |
model_name = embeddings_metadata["model_name"]
|
196 |
-
if not "cat_embed_" + model_name in st.session_state:
|
197 |
-
|
198 |
|
199 |
category_embeddings = st.session_state["cat_embed_" + model_name]
|
200 |
|
201 |
print("text_search = ", st.session_state.text_search)
|
202 |
-
print(category_embeddings)
|
203 |
if model_name:
|
204 |
input_embedding = get_sentence_transformer_embeddings(st.session_state.text_search, model_name=model_name)
|
205 |
else:
|
|
|
193 |
|
194 |
else:
|
195 |
model_name = embeddings_metadata["model_name"]
|
196 |
+
#if not "cat_embed_" + model_name in st.session_state:
|
197 |
+
get_category_embeddings(embeddings_metadata)
|
198 |
|
199 |
category_embeddings = st.session_state["cat_embed_" + model_name]
|
200 |
|
201 |
print("text_search = ", st.session_state.text_search)
|
202 |
+
print('here_cat_embeddings', category_embeddings)
|
203 |
if model_name:
|
204 |
input_embedding = get_sentence_transformer_embeddings(st.session_state.text_search, model_name=model_name)
|
205 |
else:
|