logo
Browse Source

Update readme

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

15
README.md

@ -17,9 +17,8 @@ This operator is implemented with pre-trained models from [Huggingface Transform
Use the pre-trained model 'distilbert-base-cased' Use the pre-trained model 'distilbert-base-cased'
to generate a text embedding for the sentence "Hello, world.". to generate a text embedding for the sentence "Hello, world.".
*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 ```python
from towhee.dc2 import pipe, ops, DataCollection from towhee.dc2 import pipe, ops, DataCollection
@ -34,18 +33,6 @@ DataCollection(p('Hello, world.')).show()
<img src="./result.png" width="800px"/> <img src="./result.png" width="800px"/>
- **option 2:**
```python
import towhee
(
towhee.dc['text'](["Hello, world."])
.text_embedding.transformers['text', 'vec'](model_name="distilbert-base-cased")
.show()
)
```
<br /> <br />
## Factory Constructor ## Factory Constructor

Loading…
Cancel
Save