Skip to content

Commit

Permalink
Fixed type check.
Browse files Browse the repository at this point in the history
  • Loading branch information
vladd-bit committed Feb 19, 2024
1 parent f00a74a commit bb53396
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions medcat_service/nlp_processor/medcat_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,9 @@ def retrain_medcat(self, content, replace_cdb):

def _populate_model_card_info(self, config: Config):
self.model_card_info["ontologies"] = config.version.ontology \
if (type(config.version.ontology) == list) else str(config.version.ontology)
if (isinstance(config.version.ontology, list)) else str(config.version.ontology)
self.model_card_info["meta_cat_model_names"] = [i["Category Name"] for i in config.version.meta_cats] \
if (type(config.version.meta_cats) == list) else str(config.version.meta_cats)
if (isinstance(config.version.meta_cats, list)) else str(config.version.meta_cats)
self.model_card_info["model_last_modified_on"] = str(config.version.last_modified)

# helper MedCAT methods
Expand Down

0 comments on commit bb53396

Please sign in to comment.