Instructions to use Nehc/rst with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Nehc/rst with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Nehc/rst", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| 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']}]") | |
| ``` |