jattokatarratto commited on
Commit
ad6b406
·
verified ·
1 Parent(s): ad17203

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -2582,9 +2582,8 @@ def nerBio(text, ModelsSelection, CategoriesSelection, ScoreFilt, EntityLinking,
2582
  # 'word'], axis=1)
2583
  df_annotated_combined['entity_with_link'] = df_annotated_combined.apply(
2584
  lambda
2585
- row: f"<a href='https://api-vast.jrc.service.ec.europa.eu/describe//?url={row['namedEntity']}'>{row['word']}</a>" if pd.notnull(
2586
- row['namedEntity']) else row[
2587
- 'word'], axis=1)
2588
 
2589
 
2590
  # Create a new dictionary with the entity information and the link
 
2582
  # 'word'], axis=1)
2583
  df_annotated_combined['entity_with_link'] = df_annotated_combined.apply(
2584
  lambda
2585
+ row: f"<a href='https://api-vast.jrc.service.ec.europa.eu/describe//?url={row['namedEntity']}' target='_blank'>{row['word']}</a>" if row['namedEntity'] not in [None, '', 'NaN', 'nan'] and pd.notnull(row['namedEntity']) else row[
2586
+ 'word'], axis=1)
 
2587
 
2588
 
2589
  # Create a new dictionary with the entity information and the link