Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -2611,8 +2611,7 @@ def nerBio(text, ModelsSelection, CategoriesSelection, ScoreFilt, EntityLinking,
|
|
2611 |
filter_mask = df_annotated_combined['entity_group'].str.lower().isin(
|
2612 |
[cat.lower() for cat in CategoriesSelection])
|
2613 |
if "MED" in CategoriesSelection:
|
2614 |
-
filter_mask |= df_annotated_combined['entity_group'].str.lower().isin(
|
2615 |
-
[cat.lower() for cat in CategoriesSelection]) & (df_annotated_combined['IsBio'] == 1)
|
2616 |
if "MISC" in CategoriesSelection:
|
2617 |
# filter_mask |= ~(df_annotated_combined['entity_group'].str.lower().isin([cat.lower() for cat in categories_List]))
|
2618 |
# filter_mask |= ~(df_annotated_combined['entity_group'].str.lower().isin([cat.lower() for cat in categories_List])) & ~(df_annotated_combined['IsBio'] == 1) # with this cluase, I'm including not only the categories labelled as MISC, but also the other that are not MED, PER, ORG, LOC
|
|
|
2611 |
filter_mask = df_annotated_combined['entity_group'].str.lower().isin(
|
2612 |
[cat.lower() for cat in CategoriesSelection])
|
2613 |
if "MED" in CategoriesSelection:
|
2614 |
+
filter_mask |= ~(df_annotated_combined['entity_group'].str.lower().isin([cat.lower() for cat in categories_List])) & (df_annotated_combined['IsBio'] == 1)
|
|
|
2615 |
if "MISC" in CategoriesSelection:
|
2616 |
# filter_mask |= ~(df_annotated_combined['entity_group'].str.lower().isin([cat.lower() for cat in categories_List]))
|
2617 |
# filter_mask |= ~(df_annotated_combined['entity_group'].str.lower().isin([cat.lower() for cat in categories_List])) & ~(df_annotated_combined['IsBio'] == 1) # with this cluase, I'm including not only the categories labelled as MISC, but also the other that are not MED, PER, ORG, LOC
|