HonestAnnie commited on
Commit
2c88b04
·
1 Parent(s): 04bac47
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -11,7 +11,7 @@ from spaces import GPU
11
 
12
  @GPU
13
  def get_embeddings(text, task):
14
- model = SentenceTransformer("Linq-AI-Research/Linq-Embed-Mistral")
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
 
11
 
12
  @GPU
13
  def get_embeddings(text, task):
14
+ model = SentenceTransformer("Linq-AI-Research/Linq-Embed-Mistral", use_auth_token=os.getenv("HF_TOKEN"))
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