Jan Mühlnikel commited on
Commit
530c653
1 Parent(s): 51fba38

moved caching into one function

Browse files
__pycache__/similarity_page.cpython-310.pyc CHANGED
Binary files a/__pycache__/similarity_page.cpython-310.pyc and b/__pycache__/similarity_page.cpython-310.pyc differ
 
similarity_page.py CHANGED
@@ -29,15 +29,9 @@ def load_sim_matrix():
29
  loaded_matrix = load_npz("src/extended_similarities.npz")
30
  dense_matrix = loaded_matrix.toarray()
31
 
32
- return dense_matrix
33
-
34
- # Load Non Similar Orga Matrix
35
- @st.cache_data
36
- def load_nonsameorga_sim_matrix():
37
- loaded_matrix = load_npz("src/extended_similarities_nonsimorga.npz")
38
- dense_matrix = loaded_matrix.toarray()
39
-
40
- return dense_matrix
41
 
42
  # Load Projects DFs
43
  @st.cache_data
@@ -117,8 +111,7 @@ def load_embeddings_and_index():
117
  return sentences, embeddings
118
 
119
  # USE CACHE FUNCTIONS
120
- sim_matrix = load_sim_matrix()
121
- nonsameorgas_sim_matrix = load_nonsameorga_sim_matrix()
122
  projects_df = load_projects()
123
 
124
  CRS3_MERGED = getCRS3()
 
29
  loaded_matrix = load_npz("src/extended_similarities.npz")
30
  dense_matrix = loaded_matrix.toarray()
31
 
32
+ loaded_nonsimorga_matrix = load_npz("src/extended_similarities_nonsimorga.npz")
33
+ dense_nonsimorga_matrix = loaded_nonsimorga_matrix.toarray()
34
+ return dense_matrix, dense_nonsimorga_matrix
 
 
 
 
 
 
35
 
36
  # Load Projects DFs
37
  @st.cache_data
 
111
  return sentences, embeddings
112
 
113
  # USE CACHE FUNCTIONS
114
+ sim_matrix, nonsameorgas_sim_matrix = load_sim_matrix()
 
115
  projects_df = load_projects()
116
 
117
  CRS3_MERGED = getCRS3()
src/similarities.npz DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:211a47450410bee2ea05372c1b34ffb445f58d248eb3eddec008c79e0e5207ae
3
- size 47341017