Skip to content

Commit

Permalink
3.0.19
Browse files Browse the repository at this point in the history
Signed-off-by: Praneeth Bedapudi <[email protected]>
  • Loading branch information
bedapudi6788 committed Oct 28, 2024
1 parent 4d0f45c commit 5d295f4
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
5 changes: 5 additions & 0 deletions recipes/text_embeddings/example.py
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"
]
11 changes: 11 additions & 0 deletions recipes/text_embeddings/predictor.py
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)

1 change: 1 addition & 0 deletions recipes/text_embeddings/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sentence-transformers
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 5d295f4

Please sign in to comment.