logo
Browse Source

Update readme

Signed-off-by: Jael Gu <mengjia.gu@zilliz.com>
main
Jael Gu 2 years ago
parent
commit
e0baa4aa07
  1. 15
      README.md

15
README.md

@ -17,9 +17,8 @@ This operator is implemented with pre-trained models from [Sentence Transformers
Use the pre-trained model "all-MiniLM-L12-v2"
to generate a text embedding for the sentence "This is a sentence.".
*Write a same pipeline with explicit inputs/outputs name specifications:*
*Write a pipeline with explicit inputs/outputs name specifications:*
- **option 1 (towhee>=0.9.0):**
```python
from towhee.dc2 import pipe, ops, DataCollection
@ -34,18 +33,6 @@ DataCollection(p('This is a sentence.')).show()
<img src="./result.png" width="800px"/>
- **option 2:**
```python
import towhee
(
towhee.dc['sentence'](['This is a sentence.'])
.sentence_embedding.sbert['sentence', 'vec'](model_name='all-MiniLM-L12-v2')
.show()
)
```
<br />
## Factory Constructor

Loading…
Cancel
Save