transformers ru license:mit endpoints_compatible region:us
---
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']}]")

```