File size: 685 Bytes
5068fe6 3f269ee 5068fe6 3f269ee 41fbce5 3f269ee |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
---
license: mit
language:
- ru
library_name: transformers
---
Annoy vector db of Russian Synodal Translation (RST) of **Bible**
Embdding by [intfloat/multilingual-e5-large](https://huggingface.co/intfloat/multilingual-e5-large)
Ussage:
```
rst_ind = AnnoyIndex(1024, metric='angular')
rst_ind.load('rst.indx')
rst_df = pandas.read_csv('rst_db.csv')
embd = GetE5Emb("Как жить правильно и не совершить греха?") # see the origin e5-large usage
indices = rst_ind.get_nns_by_vector(emb, 3)
ind = random.choice(indices)
str_ = rst_df.loc[ind].Text
print(f"{str_} [{rst_df.loc[ind]['Book']}{rst_df.loc[ind]['Chapter']}:{rst_df.loc[ind]['Verse']}]")
``` |