jattokatarratto commited on
Commit
9ead96a
·
verified ·
1 Parent(s): d1e28e2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -2225,8 +2225,13 @@ def nerBio(text, ModelsSelection, CategoriesSelection, ScoreFilt, EntityLinking,
2225
  # lambda row: f"<a href='{row['namedEntity']}'>{row['word']}</a>" if pd.notnull(row['namedEntity']) else row[
2226
  # 'word'], axis=1)
2227
  #include the expl-rel prefix:
 
 
 
2228
  df_annotated_combined['entity_with_link'] = df_annotated_combined.apply(
2229
- lambda row: f"<a href='https://expl-rels-dev-vast.apps.ocpt.jrc.ec.europa.eu/?concept={row['namedEntity']}'>{row['word']}</a>" if pd.notnull(row['namedEntity']) else row[
 
 
2230
  'word'], axis=1)
2231
 
2232
  # Create a new dictionary with the entity information and the link
 
2225
  # lambda row: f"<a href='{row['namedEntity']}'>{row['word']}</a>" if pd.notnull(row['namedEntity']) else row[
2226
  # 'word'], axis=1)
2227
  #include the expl-rel prefix:
2228
+ #df_annotated_combined['entity_with_link'] = df_annotated_combined.apply(
2229
+ # lambda row: f"<a href='https://expl-rels-dev-vast.apps.ocpt.jrc.ec.europa.eu/?concept={row['namedEntity']}'>{row['word']}</a>" if pd.notnull(row['namedEntity']) else row[
2230
+ # 'word'], axis=1)
2231
  df_annotated_combined['entity_with_link'] = df_annotated_combined.apply(
2232
+ lambda
2233
+ row: f"<a href='https://api-vast.jrc.service.ec.europa.eu/describe//?url={row['namedEntity']}'>{row['word']}</a>" if pd.notnull(
2234
+ row['namedEntity']) else row[
2235
  'word'], axis=1)
2236
 
2237
  # Create a new dictionary with the entity information and the link