Spaces:
Sleeping
Sleeping
codeblacks
commited on
Commit
•
e08b910
1
Parent(s):
fa35049
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ model = SentenceTransformer('sentence-transformers/paraphrase-mpnet-base-v2')
|
|
6 |
|
7 |
def get_embeddings(sentences):
|
8 |
# Get embeddings for the input sentences
|
9 |
-
embeddings = model.encode(sentences)
|
10 |
return embeddings.tolist()
|
11 |
|
12 |
# Define the Gradio interface
|
|
|
6 |
|
7 |
def get_embeddings(sentences):
|
8 |
# Get embeddings for the input sentences
|
9 |
+
embeddings = model.encode(sentences, convert_to_tensor=True)
|
10 |
return embeddings.tolist()
|
11 |
|
12 |
# Define the Gradio interface
|