Browse Source
Update README
Signed-off-by: shiyu22 <shiyu.chen@zilliz.com>
main
1 changed files with
6 additions and
4 deletions
-
README.md
|
@ -16,7 +16,7 @@ Search embedding in [Faiss](https://github.com/facebookresearch/faiss), **please |
|
|
|
|
|
|
|
|
## Code Example |
|
|
## Code Example |
|
|
|
|
|
|
|
|
- Insert data into Faiss first |
|
|
|
|
|
|
|
|
### Insert data into Faiss first |
|
|
|
|
|
|
|
|
```python |
|
|
```python |
|
|
import numpy as np |
|
|
import numpy as np |
|
@ -30,7 +30,7 @@ x = towhee.dc['id'](ids) \ |
|
|
.to_faiss['id', 'vec'](findex='index.bin') |
|
|
.to_faiss['id', 'vec'](findex='index.bin') |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
- Example |
|
|
|
|
|
|
|
|
### Example |
|
|
|
|
|
|
|
|
*Write the pipeline in simplified style:* |
|
|
*Write the pipeline in simplified style:* |
|
|
|
|
|
|
|
@ -61,11 +61,11 @@ Create the operator via the following factory method: |
|
|
|
|
|
|
|
|
***ann-search.faiss(findex)*** |
|
|
***ann-search.faiss(findex)*** |
|
|
|
|
|
|
|
|
|
|
|
<br /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
**Parameters:** |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
**Parameters:** |
|
|
|
|
|
|
|
|
***findex:*** *str* or *faiss.INDEX* |
|
|
***findex:*** *str* or *faiss.INDEX* |
|
|
|
|
|
|
|
@ -84,6 +84,8 @@ The path to faiss index file or faiss index. |
|
|
|
|
|
|
|
|
Query embeddings in Faiss |
|
|
Query embeddings in Faiss |
|
|
|
|
|
|
|
|
|
|
|
<br /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
**Returns:** *Entity* |
|
|
**Returns:** *Entity* |
|
|