Bofandra commited on
Commit
d1304c6
1 Parent(s): 30e3fcc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -9,6 +9,7 @@ import pickle
9
  setattr(httpcore, 'SyncHTTPTransport', 'AsyncHTTPProxy')
10
 
11
  client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
 
12
 
13
  def get_detailed_instruct(task_description: str, query: str) -> str:
14
  return f'Instruct: {task_description}\nQuery: {query}'
@@ -35,7 +36,6 @@ def respond(message,
35
  get_detailed_instruct(task, message)
36
  ]
37
 
38
- model = SentenceTransformer('intfloat/multilingual-e5-large-instruct')
39
  query_embeddings = model.encode(queries, convert_to_tensor=True, normalize_embeddings=True)
40
  scores = (query_embeddings @ encoded_questions.T) * 100
41
  selected_references['similarity'] = scores.tolist()[0]
 
9
  setattr(httpcore, 'SyncHTTPTransport', 'AsyncHTTPProxy')
10
 
11
  client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
12
+ model = SentenceTransformer('intfloat/multilingual-e5-large-instruct')
13
 
14
  def get_detailed_instruct(task_description: str, query: str) -> str:
15
  return f'Instruct: {task_description}\nQuery: {query}'
 
36
  get_detailed_instruct(task, message)
37
  ]
38
 
 
39
  query_embeddings = model.encode(queries, convert_to_tensor=True, normalize_embeddings=True)
40
  scores = (query_embeddings @ encoded_questions.T) * 100
41
  selected_references['similarity'] = scores.tolist()[0]