Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -4,7 +4,7 @@ from InstructorEmbedding import INSTRUCTOR
4
  model = INSTRUCTOR('hkunlp/instructor-xl')
5
 
6
  def create_embedding(instruction, sentence):
7
- embeddings = model.encode([[instruction, sentence]])
8
  print("Embeddings:", embeddings)
9
  return embeddings
10
 
@@ -14,6 +14,6 @@ instructor_model_embeddings = gr.Interface(
14
  gr.inputs.Textbox(label="Query_Instruction"),
15
  gr.inputs.Textbox(label="Query")
16
  ],
17
- outputs="text",
18
  title="API-Instructor-XL-1",
19
  ).launch()
 
4
  model = INSTRUCTOR('hkunlp/instructor-xl')
5
 
6
  def create_embedding(instruction, sentence):
7
+ embeddings = model.encode([[query_instruction, query]]).tolist()
8
  print("Embeddings:", embeddings)
9
  return embeddings
10
 
 
14
  gr.inputs.Textbox(label="Query_Instruction"),
15
  gr.inputs.Textbox(label="Query")
16
  ],
17
+ outputs="list",
18
  title="API-Instructor-XL-1",
19
  ).launch()