Nehc commited on
Commit
3f269ee
·
verified ·
1 Parent(s): 17d86fe

Update README.md

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