Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -142,7 +142,7 @@ def visualize_isnad(taraf_num, yaxis):
|
|
142 |
# Merge isnad_hadith with narrator_bios for Teacher and Student
|
143 |
isnad_hadith = isnad_hadith.merge(narrator_bios[['Rawi ID', 'Famous Name']], left_on='Source', right_on='Rawi ID', how='left').rename(columns={'Famous Name': 'Teacher'})
|
144 |
isnad_hadith = isnad_hadith.merge(narrator_bios[['Rawi ID', 'Famous Name']], left_on='Destination', right_on='Rawi ID', how='left').rename(columns={'Famous Name': 'Student'})
|
145 |
-
|
146 |
# Fill missing values with 'ููุงู'
|
147 |
isnad_hadith['Teacher'].fillna('ููุงู', inplace=True)
|
148 |
isnad_hadith['Student'].fillna('ููุงู', inplace=True)
|
@@ -163,7 +163,7 @@ def visualize_isnad(taraf_num, yaxis):
|
|
163 |
label = f'{node_name} \n {student_rank} \n ID: {node} - Gen {student_gen}'
|
164 |
size = 50
|
165 |
font_color = 'red'
|
166 |
-
if node == 99999:
|
167 |
label = f'{node_name} \n ID: {node} - Gen {student_gen}'
|
168 |
size = 70
|
169 |
font_color = 'black'
|
|
|
142 |
# Merge isnad_hadith with narrator_bios for Teacher and Student
|
143 |
isnad_hadith = isnad_hadith.merge(narrator_bios[['Rawi ID', 'Famous Name']], left_on='Source', right_on='Rawi ID', how='left').rename(columns={'Famous Name': 'Teacher'})
|
144 |
isnad_hadith = isnad_hadith.merge(narrator_bios[['Rawi ID', 'Famous Name']], left_on='Destination', right_on='Rawi ID', how='left').rename(columns={'Famous Name': 'Student'})
|
145 |
+
isnad_hadith[['Source', 'Destination']] = isnad_hadith[['Source', 'Destination']].astype(str)
|
146 |
# Fill missing values with 'ููุงู'
|
147 |
isnad_hadith['Teacher'].fillna('ููุงู', inplace=True)
|
148 |
isnad_hadith['Student'].fillna('ููุงู', inplace=True)
|
|
|
163 |
label = f'{node_name} \n {student_rank} \n ID: {node} - Gen {student_gen}'
|
164 |
size = 50
|
165 |
font_color = 'red'
|
166 |
+
if node == '99999':
|
167 |
label = f'{node_name} \n ID: {node} - Gen {student_gen}'
|
168 |
size = 70
|
169 |
font_color = 'black'
|