Skip to content

Commit

Permalink
Add other libs to integrations.py
Browse files Browse the repository at this point in the history
  • Loading branch information
arxyzan committed Aug 27, 2023
1 parent 7ff04e6 commit c4210d1
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion hezar/integrations.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,39 @@
import importlib.util


__all__ = [
"is_transformers_available",
"is_datasets_available",
"is_tokenizers_available",
"is_soundfile_available",
"is_librosa_available",
"is_wandb_available",
"is_gensim_available",
]


def is_transformers_available():
return importlib.util.find_spec("transformers") is not None


def is_datasets_available():
return importlib.util.find_spec("datasets") is not None


def is_tokenizers_available():
return importlib.util.find_spec("tokenizers") is not None


def is_soundfile_available():
return importlib.util.find_spec("soundfile") is not None


def is_librosa_available():
return importlib.util.find_spec("librosa") is not None


def is_wandb_available():
return importlib.util.find_spec("wandb") is not None


def is_gensim_available():
return importlib.util.find_spec("gensim") is not None

0 comments on commit c4210d1

Please sign in to comment.