Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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():
|