Update app.py
Browse files
app.py
CHANGED
@@ -71,8 +71,11 @@ def network_narrator(narrator_id):
|
|
71 |
return edge_full
|
72 |
|
73 |
def narrator_retriever(name):
|
74 |
-
|
75 |
-
|
|
|
|
|
|
|
76 |
|
77 |
|
78 |
with gr.Blocks() as demo:
|
|
|
71 |
return edge_full
|
72 |
|
73 |
def narrator_retriever(name):
|
74 |
+
if 'ALL' in name:
|
75 |
+
return narrator_bios
|
76 |
+
else:
|
77 |
+
full_names = name.replace(', ', '|').replace(',', '|')
|
78 |
+
return narrator_bios[(narrator_bios['Official Name'].apply(lambda x: araby.strip_diacritics(x)).str.contains(araby.strip_diacritics(name), regex=True)) | (narrator_bios['Famous Name'].apply(lambda x: araby.strip_diacritics(x)).str.contains(araby.strip_diacritics(name), regex=True)) | (narrator_bios['Rawi ID'].astype(str).isin(full_names.split('|')))]
|
79 |
|
80 |
|
81 |
with gr.Blocks() as demo:
|