Jan Mühlnikel commited on
Commit
cceb9c7
1 Parent(s): 7b52ef0

ram optimizations

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
@@ -105,6 +105,7 @@ def load_model():
105
  return model
106
 
107
 
 
108
  # Load Embeddings
109
  @st.cache_data
110
  def load_embeddings_and_index():
@@ -114,6 +115,8 @@ def load_embeddings_and_index():
114
  embeddings = stored_data["embeddings"]
115
 
116
  return embeddings
 
 
117
 
118
  # USE CACHE FUNCTIONS
119
  sim_matrix = load_sim_matrix()
@@ -128,7 +131,8 @@ COUNTRY_OPTION_LIST = getCountry()
128
 
129
  # LOAD MODEL FROM CACHE FO SEMANTIC SEARCH
130
  model = load_model()
131
- embeddings = load_embeddings_and_index()
 
132
 
133
  def show_page():
134
  st.write(f"Current RAM usage of this app: {get_process_memory():.2f} MB")
 
105
  return model
106
 
107
 
108
+ """
109
  # Load Embeddings
110
  @st.cache_data
111
  def load_embeddings_and_index():
 
115
  embeddings = stored_data["embeddings"]
116
 
117
  return embeddings
118
+ """
119
+
120
 
121
  # USE CACHE FUNCTIONS
122
  sim_matrix = load_sim_matrix()
 
131
 
132
  # LOAD MODEL FROM CACHE FO SEMANTIC SEARCH
133
  model = load_model()
134
+ #embeddings = load_embeddings_and_index()
135
+ embeddings = []
136
 
137
  def show_page():
138
  st.write(f"Current RAM usage of this app: {get_process_memory():.2f} MB")