Browse Source
Update README
Signed-off-by: Jael Gu <mengjia.gu@zilliz.com>
main
2 changed files with
4 additions and
4 deletions
-
README.md
-
BIN
result.png
|
@ -23,8 +23,8 @@ to generate text embeddings for given code "" and text description "". |
|
|
import towhee |
|
|
import towhee |
|
|
|
|
|
|
|
|
( |
|
|
( |
|
|
towhee.dc([""]) |
|
|
|
|
|
.text_embedding.transformers(model_name="distilbert-base-cased") |
|
|
|
|
|
|
|
|
towhee.dc(['find max value', 'def max(a,b): if a>b: return a else return b']) |
|
|
|
|
|
.code_search.codebert(model_name='huggingface/CodeBERTa-small-v1') |
|
|
) |
|
|
) |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
@ -34,8 +34,8 @@ import towhee |
|
|
import towhee |
|
|
import towhee |
|
|
|
|
|
|
|
|
( |
|
|
( |
|
|
towhee.dc['text'](["Hello, world."]) |
|
|
|
|
|
.text_embedding.transformers['text', 'vec'](model_name="distilbert-base-cased") |
|
|
|
|
|
|
|
|
towhee.dc['text'](['find max value', 'def max(a,b): if a>b: return a else return b']) |
|
|
|
|
|
.code_search.codebert['text', 'embedding'](model_name='huggingface/CodeBERTa-small-v1') |
|
|
.show() |
|
|
.show() |
|
|
) |
|
|
) |
|
|
``` |
|
|
``` |
|
|
Width:
|
Height:
|
Size: 13 KiB
|