tcy6 commited on
Commit
c0e4e6e
1 Parent(s): ffd32f8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -122,7 +122,7 @@ def retrieve_gradio(knowledge_base: str, query: str, topk: int):
122
  for line in f:
123
  md5s.append(line.rstrip('\n'))
124
 
125
- doc_reps = np.load(os.path.join(target_cache_dir, f"reps.npy"))
126
 
127
  query_with_instruction = "Represent this query for retrieving relavant document: " + query
128
  with torch.no_grad():
 
122
  for line in f:
123
  md5s.append(line.rstrip('\n'))
124
 
125
+ doc_reps = np.load(os.path.join(target_cache_dir, f"reps.npy")).squeeze(1)
126
 
127
  query_with_instruction = "Represent this query for retrieving relavant document: " + query
128
  with torch.no_grad():