Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -50,8 +50,8 @@ def get_narrators( city , year1, year2):
|
|
50 |
df = subset_city_year(city, year1, year2)
|
51 |
narrators = edge_info[edge_info['Edge_ID'].isin(df['ID'])]
|
52 |
fixed = splitIsnad(narrators)
|
53 |
-
fixed['Teacher Reports'] = fixed['Teacher_ID'].apply(lambda x: narrator_bios[narrator_bios['Rawi ID']== x]
|
54 |
-
fixed['Student Reports'] = fixed['Student_ID'].apply(lambda x: narrator_bios[narrator_bios['Rawi ID']== x]
|
55 |
return fixed[['Teacher', 'Student', 'Teacher Reports', 'Student Reports']]
|
56 |
except Exception as e:
|
57 |
return str(e)
|
|
|
50 |
df = subset_city_year(city, year1, year2)
|
51 |
narrators = edge_info[edge_info['Edge_ID'].isin(df['ID'])]
|
52 |
fixed = splitIsnad(narrators)
|
53 |
+
fixed['Teacher Reports'] = fixed['Teacher_ID'].apply(lambda x: narrator_bios[narrator_bios['Rawi ID']== x]['Number of Narrations'].to_list()[0])
|
54 |
+
fixed['Student Reports'] = fixed['Student_ID'].apply(lambda x: narrator_bios[narrator_bios['Rawi ID']== x]['Number of Narrations'].to_list()[0])
|
55 |
return fixed[['Teacher', 'Student', 'Teacher Reports', 'Student Reports']]
|
56 |
except Exception as e:
|
57 |
return str(e)
|