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
ai-bot-test / venv /lib /python3.11 /site-packages /prompt_toolkit /key_binding /bindings /search.py
Download venv/lib/python3.11/site-packages/prompt_toolkit/key_binding/bindings/search.py from realitisoft/ai-bot-test: direct link, hf CLI and curl.
- Browser
- Download file 2.63 kB
-
https://huggingface.co/realitisoft/ai-bot-test/resolve/main/venv/lib/python3.11/site-packages/prompt_toolkit/key_binding/bindings/search.py
- Command line
-
hf download hf://realitisoft/ai-bot-test/venv/lib/python3.11/site-packages/prompt_toolkit/key_binding/bindings/search.py
-
curl -L -o search.py https://huggingface.co/realitisoft/ai-bot-test/resolve/main/venv/lib/python3.11/site-packages/prompt_toolkit/key_binding/bindings/search.py
2.63 kB
| """ | |
| Search related key bindings. | |
| """ | |
| from __future__ import annotations | |
| from prompt_toolkit import search | |
| from prompt_toolkit.application.current import get_app | |
| from prompt_toolkit.filters import Condition, control_is_searchable, is_searching | |
| from prompt_toolkit.key_binding.key_processor import KeyPressEvent | |
| from ..key_bindings import key_binding | |
| __all__ = [ | |
| "abort_search", | |
| "accept_search", | |
| "start_reverse_incremental_search", | |
| "start_forward_incremental_search", | |
| "reverse_incremental_search", | |
| "forward_incremental_search", | |
| "accept_search_and_accept_input", | |
| ] | |
| E = KeyPressEvent | |
| def abort_search(event: E) -> None: | |
| """ | |
| Abort an incremental search and restore the original | |
| line. | |
| (Usually bound to ControlG/ControlC.) | |
| """ | |
| search.stop_search() | |
| def accept_search(event: E) -> None: | |
| """ | |
| When enter pressed in isearch, quit isearch mode. (Multiline | |
| isearch would be too complicated.) | |
| (Usually bound to Enter.) | |
| """ | |
| search.accept_search() | |
| def start_reverse_incremental_search(event: E) -> None: | |
| """ | |
| Enter reverse incremental search. | |
| (Usually ControlR.) | |
| """ | |
| search.start_search(direction=search.SearchDirection.BACKWARD) | |
| def start_forward_incremental_search(event: E) -> None: | |
| """ | |
| Enter forward incremental search. | |
| (Usually ControlS.) | |
| """ | |
| search.start_search(direction=search.SearchDirection.FORWARD) | |
| def reverse_incremental_search(event: E) -> None: | |
| """ | |
| Apply reverse incremental search, but keep search buffer focused. | |
| """ | |
| search.do_incremental_search(search.SearchDirection.BACKWARD, count=event.arg) | |
| def forward_incremental_search(event: E) -> None: | |
| """ | |
| Apply forward incremental search, but keep search buffer focused. | |
| """ | |
| search.do_incremental_search(search.SearchDirection.FORWARD, count=event.arg) | |
| def _previous_buffer_is_returnable() -> bool: | |
| """ | |
| True if the previously focused buffer has a return handler. | |
| """ | |
| prev_control = get_app().layout.search_target_buffer_control | |
| return bool(prev_control and prev_control.buffer.is_returnable) | |
| def accept_search_and_accept_input(event: E) -> None: | |
| """ | |
| Accept the search operation first, then accept the input. | |
| """ | |
| search.accept_search() | |
| event.current_buffer.validate_and_handle() | |