binhcode25 commited on
Commit
3e8c9bf
1 Parent(s): eb30144

Add new SentenceTransformer model.

Browse files
Files changed (1) hide show
  1. README.md +12 -1
README.md CHANGED
@@ -30,7 +30,7 @@ Using this model becomes easy when you have [LightEmbed](https://pypi.org/projec
30
  pip install -U light-embed
31
  ```
32
 
33
- Then you can use the model like this:
34
 
35
  ```python
36
  from light_embed import TextEmbedding
@@ -41,6 +41,17 @@ embeddings = model.encode(sentences)
41
  print(embeddings)
42
  ```
43
 
 
 
 
 
 
 
 
 
 
 
 
44
  ## Citing & Authors
45
 
46
  Binh Nguyen / [email protected]
 
30
  pip install -U light-embed
31
  ```
32
 
33
+ Then you can use the model using the original model name like this:
34
 
35
  ```python
36
  from light_embed import TextEmbedding
 
41
  print(embeddings)
42
  ```
43
 
44
+ Then you can use the model using onnx model name like this:
45
+
46
+ ```python
47
+ from light_embed import TextEmbedding
48
+ sentences = ["This is an example sentence", "Each sentence is converted"]
49
+
50
+ model = TextEmbedding('sbert-all-MiniLM-L6-v2-onnx')
51
+ embeddings = model.encode(sentences)
52
+ print(embeddings)
53
+ ```
54
+
55
  ## Citing & Authors
56
 
57
  Binh Nguyen / [email protected]