-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Praneeth Bedapudi <[email protected]>
- Loading branch information
1 parent
4d0f45c
commit 5d295f4
Showing
4 changed files
with
19 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
example = [ | ||
"This is a test sentence which is a bit longer than the others and also very long than normal and some more words here and some more words here and some more there", | ||
"This is another test sentence", | ||
"This is a third test sentence" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from sentence_transformers import SentenceTransformer | ||
|
||
sentences = ['That is a happy person', 'That is a very happy person'] | ||
|
||
model = SentenceTransformer('Alibaba-NLP/gte-base-en-v1.5', trust_remote_code=True) | ||
|
||
from time import time | ||
|
||
def predictor(input_list, batch_size=16): | ||
return model.encode(input_list, convert_to_numpy=True, normalize_embeddings=True, show_progress_bar=False, batch_size=batch_size) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sentence-transformers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,10 +18,10 @@ | |
EMAIL = "[email protected]" | ||
AUTHOR = "BEDAPUDI PRANEETH" | ||
REQUIRES_PYTHON = ">=3.6.0" | ||
VERSION = "3.0.18" | ||
VERSION = "3.0.19" | ||
|
||
# What packages are required for this module to be executed? | ||
REQUIRED = ["falcon", "liteindex", "zstandard", "gunicorn[gevent]", "msgpack"] | ||
REQUIRED = ["falcon", "liteindex==0.0.3.2.dev4", "zstandard", "gunicorn[gevent]", "msgpack"] | ||
|
||
# What packages are optional? | ||
EXTRAS = { | ||
|