Skip to content

Commit

Permalink
Load models before getting models
Browse files Browse the repository at this point in the history
  • Loading branch information
bgyori committed Jul 19, 2022
1 parent 54e14ba commit 3be0c44
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gilda/grounder.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,8 @@ def get_models(self):
The list of entity texts for which a disambiguation model is
available.
"""
if self.gilda_disambiguators is None:
self.gilda_disambiguators = load_gilda_models()
return sorted(list(self.gilda_disambiguators.keys()))

def get_names(self, db, id, status=None, source=None):
Expand Down

0 comments on commit 3be0c44

Please sign in to comment.