jattokatarratto commited on
Commit
f29399f
·
verified ·
1 Parent(s): 0895a00

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -8
app.py CHANGED
@@ -2580,15 +2580,12 @@ def nerBio(text, ModelsSelection, CategoriesSelection, ScoreFilt, EntityLinking,
2580
  # row: f"<a href='https://api-vast.jrc.service.ec.europa.eu/describe//?url={row['namedEntity']}' target='_blank'>{row['word']}</a>" if pd.notnull(
2581
  # row['namedEntity']) else row[
2582
  # 'word'], axis=1)
2583
-
2584
  df_annotated_combined['entity_with_link'] = df_annotated_combined.apply(
2585
- lambda row: (
2586
- f"<a href='https://expl-rels-dev-vast.apps.ocpt.jrc.ec.europa.eu/?concept={row['namedEntity']}' target='_blank'>{row['word']}</a>"
2587
- if row['namedEntity'] not in [None, '', 'NaN', 'nan'] and pd.notnull(row['namedEntity']) else row[
2588
- 'word']
2589
- ),
2590
- axis=1
2591
- )
2592
 
2593
  # Create a new dictionary with the entity information and the link
2594
  dict_annotated_combined_NEL = df_annotated_combined[
 
2580
  # row: f"<a href='https://api-vast.jrc.service.ec.europa.eu/describe//?url={row['namedEntity']}' target='_blank'>{row['word']}</a>" if pd.notnull(
2581
  # row['namedEntity']) else row[
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
2591
  dict_annotated_combined_NEL = df_annotated_combined[