HonestAnnie commited on
Commit
38d2199
1 Parent(s): 3bbb5f4
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -15,7 +15,7 @@ def get_embeddings(text, task):
15
  task = "Given a question, retrieve passages that answer the question"
16
  prompt = f"Instruct: {task}\nQuery: {text}" # Use text here
17
  query_embeddings = model.encode([prompt], convert_to_tensor=True) # Ensure it's a list
18
- return query_embeddings
19
 
20
 
21
  # Initialize a persistent Chroma client and retrieve collection
 
15
  task = "Given a question, retrieve passages that answer the question"
16
  prompt = f"Instruct: {task}\nQuery: {text}" # Use text here
17
  query_embeddings = model.encode([prompt], convert_to_tensor=True) # Ensure it's a list
18
+ return query_embeddings.cpu().numpy()
19
 
20
 
21
  # Initialize a persistent Chroma client and retrieve collection