FloraJ commited on
Commit
8b5c603
1 Parent(s): 9b6ddfd

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +3 -3
utils.py CHANGED
@@ -44,7 +44,7 @@ def transform_user_question(question, model):
44
 
45
 
46
  def search_document(user_question_embed: list, top_k: int = 1):
47
- csv_filename = 'database/document_name_to_embedding.csv'
48
  if not os.path.exists(csv_filename):
49
  print("This won't happen!")
50
  return
@@ -77,7 +77,7 @@ def search_document(user_question_embed: list, top_k: int = 1):
77
 
78
 
79
  def search_document_annoy(user_question_embed: list, top_k: int, metric):
80
- csv_filename = 'database/document_name_to_embedding.csv'
81
  if not os.path.exists(csv_filename):
82
  print("This won't happen!")
83
  return
@@ -219,7 +219,7 @@ def main():
219
  filename_to_embedding_df = get_document_embeddings(path, fn_list)
220
  final_df = pd.concat([final_df, filename_to_embedding_df], axis=0, ignore_index=True)
221
 
222
- final_df.to_csv('database/document_name_to_embedding.csv')
223
 
224
 
225
  def parse_downloads_to_title_to_info():
 
44
 
45
 
46
  def search_document(user_question_embed: list, top_k: int = 1):
47
+ csv_filename = 'document_name_to_embedding.csv'
48
  if not os.path.exists(csv_filename):
49
  print("This won't happen!")
50
  return
 
77
 
78
 
79
  def search_document_annoy(user_question_embed: list, top_k: int, metric):
80
+ csv_filename = 'document_name_to_embedding.csv'
81
  if not os.path.exists(csv_filename):
82
  print("This won't happen!")
83
  return
 
219
  filename_to_embedding_df = get_document_embeddings(path, fn_list)
220
  final_df = pd.concat([final_df, filename_to_embedding_df], axis=0, ignore_index=True)
221
 
222
+ final_df.to_csv('document_name_to_embedding.csv')
223
 
224
 
225
  def parse_downloads_to_title_to_info():