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, hf_auth_token=None)[source]#
Check compatibility of a model with a task HuggingFace. The model could be in the HuggingFace hub or in local files.
- Parameters:
model (str or 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’
hf_auth_token (str, optional) – HuggingFace Authentication token (to access private models on the hub)
- Return type:
bool- Returns:
bool – Model compatibility with the task