Browse Source
Update README
Signed-off-by: Jael Gu <mengjia.gu@zilliz.com>
main
1 changed files with
0 additions and
14 deletions
-
README.md
|
@ -19,7 +19,6 @@ to generate an embedding for the sentence "Hello, world.". |
|
|
|
|
|
|
|
|
*Write a same pipeline with explicit inputs/outputs name specifications:* |
|
|
*Write a same 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 |
|
|
|
|
|
|
|
@ -35,19 +34,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.']) |
|
|
|
|
|
.sentence_embedding.transformers['text', 'vec']( |
|
|
|
|
|
model_name='sentence-transformers/paraphrase-albert-small-v2') |
|
|
|
|
|
.show() |
|
|
|
|
|
) |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
<br /> |
|
|
<br /> |
|
|
|
|
|
|
|
|
## Factory Constructor |
|
|
## Factory Constructor |
|
|