medkit.tools.hf_utils
medkit.tools.hf_utils#
This module needs extra-dependencies not installed as core dependencies of medkit. To install them, use pip install medkit-lib[hf-utils].
Functions:
|
Check compatibility of a model with a task HuggingFace. |
- check_model_for_task_HF(model, task)[source]#
Check compatibility of a model with a task HuggingFace. The model could be in the HuggingFace hub or in local files.
- Parameters
model (
Union[str,Path]) – Name (on the HuggingFace models hub) or path of the model.task (
str) – A string representing the HF task to check i.e : ‘token-classification’
- Return type
bool- Returns
bool – Model compatibility with the task