AashitaK commited on
Commit
c8db20e
·
verified ·
1 Parent(s): 2599c72

Update utils/file_utils.py

Browse files
Files changed (1) hide show
  1. utils/file_utils.py +3 -1
utils/file_utils.py CHANGED
@@ -156,13 +156,15 @@ def load_embeddings(database, database_filepath, embeddings_filepath):
156
  previous_timestamp = load_timestamp(timestamp_filepath)
157
 
158
  # Check if the timestamp of the database file is different from the stored timestamp (DB_UPDATE_TIMESTAMP)
159
- if True: #database_timestamp != previous_timestamp:
 
160
  # If the database file has been updated, generate new embeddings and save them to the embeddings file
161
  database_embeddings = update_embeddings(database, embeddings_filepath)
162
 
163
  # Update the stored timestamp
164
  save_timestamp(database_timestamp, timestamp_filepath)
165
  else:
 
166
  # If the database file has not been updated, load the existing embeddings from the pickle file
167
  database_embeddings = load_pickle(embeddings_filepath)
168
 
 
156
  previous_timestamp = load_timestamp(timestamp_filepath)
157
 
158
  # Check if the timestamp of the database file is different from the stored timestamp (DB_UPDATE_TIMESTAMP)
159
+ if database_timestamp != previous_timestamp:
160
+ print("embeddings updated")
161
  # If the database file has been updated, generate new embeddings and save them to the embeddings file
162
  database_embeddings = update_embeddings(database, embeddings_filepath)
163
 
164
  # Update the stored timestamp
165
  save_timestamp(database_timestamp, timestamp_filepath)
166
  else:
167
+ print("embeddings not updated")
168
  # If the database file has not been updated, load the existing embeddings from the pickle file
169
  database_embeddings = load_pickle(embeddings_filepath)
170