Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
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]])
|
9 |
embeddings_array = np.array(embeddings)
|
10 |
-
return
|
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,
|