Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -28,11 +28,16 @@ matn_info['taraf_ID'] = matn_info['taraf_ID'].astype(int)
|
|
28 |
matn_info['Book_ID'] = matn_info['bookid_hadithid'].apply(lambda x: int(x.split('_')[0]))
|
29 |
matn_info['Hadith Number'] = matn_info['bookid_hadithid'].apply(lambda x: int(x.split('_')[1]))
|
30 |
matn_info = pd.merge(matn_info, books, on='Book_ID')
|
|
|
|
|
|
|
|
|
31 |
cols_to_use = df.columns.difference(matn_info.columns)
|
32 |
|
33 |
-
joined_df =
|
34 |
df = joined_df.copy()
|
35 |
|
|
|
36 |
model = SentenceTransformer('FDSRashid/QulBERT', token=Secret_token)
|
37 |
arr = np.array(df['embed'].to_list())
|
38 |
|
|
|
28 |
matn_info['Book_ID'] = matn_info['bookid_hadithid'].apply(lambda x: int(x.split('_')[0]))
|
29 |
matn_info['Hadith Number'] = matn_info['bookid_hadithid'].apply(lambda x: int(x.split('_')[1]))
|
30 |
matn_info = pd.merge(matn_info, books, on='Book_ID')
|
31 |
+
|
32 |
+
matn_info = matn_info.reset_index()
|
33 |
+
df = df.reset_index()
|
34 |
+
|
35 |
cols_to_use = df.columns.difference(matn_info.columns)
|
36 |
|
37 |
+
joined_df = pd.merge(matn_info,df[cols_to_use],left_index=True, right_index=True)
|
38 |
df = joined_df.copy()
|
39 |
|
40 |
+
|
41 |
model = SentenceTransformer('FDSRashid/QulBERT', token=Secret_token)
|
42 |
arr = np.array(df['embed'].to_list())
|
43 |
|