Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -390,6 +390,10 @@ def annotate(df, args, pipeInner, tokenizerGliner, modelGliner, modelGlinerBio,
|
|
390 |
# Filter the dataframe to keep only rows where the score is greater than 3.0
|
391 |
df_max_score_biop = df_max_score_biop[df_max_score_biop['score'] > 3.0]
|
392 |
|
|
|
|
|
|
|
|
|
393 |
# Specify the columns you want to keep
|
394 |
columns_to_keep = ["score", "from", "to", "prefLabel", "text", "semantic_groups", "@id", "ALLURIScontextFromNCBO"]
|
395 |
|
|
|
390 |
# Filter the dataframe to keep only rows where the score is greater than 3.0
|
391 |
df_max_score_biop = df_max_score_biop[df_max_score_biop['score'] > 3.0]
|
392 |
|
393 |
+
if "semantic_groups" not in df_max_score_biop.columns:
|
394 |
+
# Drop the '@id' column
|
395 |
+
df_max_score_biop["semantic_groups"] = None
|
396 |
+
|
397 |
# Specify the columns you want to keep
|
398 |
columns_to_keep = ["score", "from", "to", "prefLabel", "text", "semantic_groups", "@id", "ALLURIScontextFromNCBO"]
|
399 |
|