two bugs fixed
Browse files
app.py
CHANGED
@@ -188,7 +188,7 @@ def visualize_isnad(taraf_num, yaxis):
|
|
188 |
label = f'{node_name} \n ID: {node} - Gen {student_gen}'
|
189 |
size = 70
|
190 |
font_color = 'black'
|
191 |
-
elif node in end_nodes:
|
192 |
hadith_numbers = end_node_data.get(node, '')
|
193 |
label += f' \n Hadith {hadith_numbers}'
|
194 |
net.add_node(node, font={'size': 30, 'color': font_color}, color=value_to_hex(student_narrations), label=label, x=pos[0] * x_stretch, y=-pos[1] * y_stretch, size=size)
|
@@ -344,7 +344,7 @@ def visualize_narrator_taraf(taraf_num, narrator, yaxis):
|
|
344 |
|
345 |
# Process each hadith in taraf_hadith_split
|
346 |
for idx, split_hadith in enumerate(taraf_hadith):
|
347 |
-
isnad_hadith1 = isnad_info.iloc[lookup_hadith(taraf_hadith[
|
348 |
G1 = nx.from_pandas_edgelist(isnad_hadith1, source='Source', target='Destination', create_using=nx.DiGraph())
|
349 |
if narrator in G1.nodes:
|
350 |
matns_with_narrator.append(taraf_hadith[idx])
|
|
|
188 |
label = f'{node_name} \n ID: {node} - Gen {student_gen}'
|
189 |
size = 70
|
190 |
font_color = 'black'
|
191 |
+
elif str(node) in end_nodes:
|
192 |
hadith_numbers = end_node_data.get(node, '')
|
193 |
label += f' \n Hadith {hadith_numbers}'
|
194 |
net.add_node(node, font={'size': 30, 'color': font_color}, color=value_to_hex(student_narrations), label=label, x=pos[0] * x_stretch, y=-pos[1] * y_stretch, size=size)
|
|
|
344 |
|
345 |
# Process each hadith in taraf_hadith_split
|
346 |
for idx, split_hadith in enumerate(taraf_hadith):
|
347 |
+
isnad_hadith1 = isnad_info.iloc[lookup_hadith(taraf_hadith[idx], HADITH_LOOKUP)]
|
348 |
G1 = nx.from_pandas_edgelist(isnad_hadith1, source='Source', target='Destination', create_using=nx.DiGraph())
|
349 |
if narrator in G1.nodes:
|
350 |
matns_with_narrator.append(taraf_hadith[idx])
|