awinml commited on
Commit
b84637f
1 Parent(s): 6fb12dd

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -5,9 +5,9 @@ from InstructorEmbedding import INSTRUCTOR
5
  model = INSTRUCTOR('hkunlp/instructor-xl')
6
 
7
  def create_embedding(query_instruction, query):
8
- embeddings = model.encode([[query_instruction, query]])[0]
9
  embeddings_array = np.array(embeddings)
10
- return embeddings
11
 
12
  instructor_model_embeddings = gr.Interface(
13
  fn=create_embedding,
 
5
  model = INSTRUCTOR('hkunlp/instructor-xl')
6
 
7
  def create_embedding(query_instruction, query):
8
+ embeddings = model.encode([[query_instruction, query]])
9
  embeddings_array = np.array(embeddings)
10
+ return embeddings_array
11
 
12
  instructor_model_embeddings = gr.Interface(
13
  fn=create_embedding,