Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import gradio as gr
|
2 |
from pyvis.network import Network
|
3 |
-
|
4 |
import numpy as np
|
5 |
import pandas as pd
|
6 |
import os
|
@@ -81,7 +81,7 @@ def network_narrator(narrator_id, fst_year, lst_year, yaxis):
|
|
81 |
allowpaymentrequest="" frameborder="0" srcdoc='{html}'></iframe>""", edges_prepped[['Teacher', 'Student', 'Tarafs', 'Hadiths', 'Isnads', 'Books']]
|
82 |
|
83 |
def narrator_retriever(name):
|
84 |
-
return narrator_bios[(narrator_bios['Official Name'].str.contains(name)) | (narrator_bios['Famous Name'].str.contains(name)) | (narrator_bios['Rawi ID'].astype(str) == name)][['Rawi ID', 'Title Name', 'Official Name', 'Famous Name', 'Number of Narrations', 'Narrator Rank', 'Generation' ]]
|
85 |
|
86 |
|
87 |
|
|
|
1 |
import gradio as gr
|
2 |
from pyvis.network import Network
|
3 |
+
import pyarabic.araby as araby
|
4 |
import numpy as np
|
5 |
import pandas as pd
|
6 |
import os
|
|
|
81 |
allowpaymentrequest="" frameborder="0" srcdoc='{html}'></iframe>""", edges_prepped[['Teacher', 'Student', 'Tarafs', 'Hadiths', 'Isnads', 'Books']]
|
82 |
|
83 |
def narrator_retriever(name):
|
84 |
+
return narrator_bios[(narrator_bios['Official Name'].apply(lambda x: araby.strip_diacritics(x)).str.contains(name)) | (narrator_bios['Famous Name'].apply(lambda x: araby.strip_diacritics(x)).str.contains(name)) | (narrator_bios['Rawi ID'].astype(str) == name)][['Rawi ID', 'Title Name', 'Official Name', 'Famous Name', 'Number of Narrations', 'Narrator Rank', 'Generation' ]]
|
85 |
|
86 |
|
87 |
|