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/urllib3/util/util.py from realitisoft/ai-bot-test: direct link, hf CLI and curl.
- Browser
- Download file 1.15 kB
-
https://huggingface.co/realitisoft/ai-bot-test/resolve/main/venv/lib/python3.11/site-packages/urllib3/util/util.py
- Command line
-
hf download hf://realitisoft/ai-bot-test/venv/lib/python3.11/site-packages/urllib3/util/util.py
-
curl -L -o util.py https://huggingface.co/realitisoft/ai-bot-test/resolve/main/venv/lib/python3.11/site-packages/urllib3/util/util.py
1.15 kB
| from __future__ import annotations | |
| import typing | |
| from types import TracebackType | |
| def to_bytes( | |
| x: str | bytes, encoding: str | None = None, errors: str | None = None | |
| ) -> bytes: | |
| if isinstance(x, bytes): | |
| return x | |
| elif not isinstance(x, str): | |
| raise TypeError(f"not expecting type {type(x).__name__}") | |
| if encoding or errors: | |
| return x.encode(encoding or "utf-8", errors=errors or "strict") | |
| return x.encode() | |
| def to_str( | |
| x: str | bytes, encoding: str | None = None, errors: str | None = None | |
| ) -> str: | |
| if isinstance(x, str): | |
| return x | |
| elif not isinstance(x, bytes): | |
| raise TypeError(f"not expecting type {type(x).__name__}") | |
| if encoding or errors: | |
| return x.decode(encoding or "utf-8", errors=errors or "strict") | |
| return x.decode() | |
| def reraise( | |
| tp: type[BaseException] | None, | |
| value: BaseException, | |
| tb: TracebackType | None = None, | |
| ) -> typing.NoReturn: | |
| try: | |
| if value.__traceback__ is not tb: | |
| raise value.with_traceback(tb) | |
| raise value | |
| finally: | |
| value = None # type: ignore[assignment] | |
| tb = None | |