FDSRashid commited on
Commit
b20e9c3
·
verified ·
1 Parent(s): 44d1519

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
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 = matn_info.merge(df[cols_to_use], left_index=True, right_on='__index_level_0__')
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