logo
Browse Source

Update

Signed-off-by: Jael Gu <mengjia.gu@zilliz.com>
main
Jael Gu 2 years ago
parent
commit
8048b0239f
  1. 14
      README.md
  2. BIN
      result.png

14
README.md

@ -30,13 +30,19 @@ to generate a text embedding for the sentence "Hello, world.".
*Write the pipeline*:
```python
import towhee
from towhee.dc2 import pipe, ops, DataCollection
towhee.dc(["Hello, world."]) \
.text_embedding.longformer(model_name="allenai/longformer-base-4096") \
.to_list()
p = (
pipe.input('text')
.map('text', 'vec', ops.text_embedding.longformer(model_name="allenai/longformer-base-4096"))
.output('text', 'vec')
)
DataCollection(p('Hello, world.')).show()
```
<img src="./result.png" width="800px"/>
<br />
## Factory Constructor

BIN
result.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Loading…
Cancel
Save