Instructions to use realitisoft/ai-bot-test with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use realitisoft/ai-bot-test with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="realitisoft/ai-bot-test")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq processor = AutoProcessor.from_pretrained("realitisoft/ai-bot-test") model = AutoModelForSpeechSeq2Seq.from_pretrained("realitisoft/ai-bot-test", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download venv/lib/python3.11/site-packages/huggingface_hub/utils/insecure_hashlib.py from realitisoft/ai-bot-test: direct link, hf CLI and curl.
- Browser
- Download file 1.06 kB
-
https://huggingface.co/realitisoft/ai-bot-test/resolve/main/venv/lib/python3.11/site-packages/huggingface_hub/utils/insecure_hashlib.py
- Command line
-
hf download hf://realitisoft/ai-bot-test/venv/lib/python3.11/site-packages/huggingface_hub/utils/insecure_hashlib.py
-
curl -L -o insecure_hashlib.py https://huggingface.co/realitisoft/ai-bot-test/resolve/main/venv/lib/python3.11/site-packages/huggingface_hub/utils/insecure_hashlib.py
1.06 kB
| # Taken from https://github.com/mlflow/mlflow/pull/10119 | |
| # | |
| # DO NOT use this function for security purposes (e.g., password hashing). | |
| # | |
| # In Python >= 3.9, insecure hashing algorithms such as MD5 fail in FIPS-compliant | |
| # environments unless `usedforsecurity=False` is explicitly passed. | |
| # | |
| # References: | |
| # - https://github.com/mlflow/mlflow/issues/9905 | |
| # - https://github.com/mlflow/mlflow/pull/10119 | |
| # - https://docs.python.org/3/library/hashlib.html | |
| # - https://github.com/huggingface/transformers/pull/27038 | |
| # | |
| # Usage: | |
| # ```python | |
| # # Use | |
| # from huggingface_hub.utils.insecure_hashlib import sha256 | |
| # # instead of | |
| # from hashlib import sha256 | |
| # | |
| # # Use | |
| # from huggingface_hub.utils import insecure_hashlib | |
| # # instead of | |
| # import hashlib | |
| # ``` | |
| import functools | |
| import hashlib | |
| import sys | |
| _kwargs = {"usedforsecurity": False} if sys.version_info >= (3, 9) else {} | |
| md5 = functools.partial(hashlib.md5, **_kwargs) | |
| sha1 = functools.partial(hashlib.sha1, **_kwargs) | |
| sha256 = functools.partial(hashlib.sha256, **_kwargs) | |