Instructions to use nikraf/directionality_probe with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nikraf/directionality_probe with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="nikraf/directionality_probe", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("nikraf/directionality_probe", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
| import pytest | |
| try: | |
| from modal_utils import parse_modal_api_key | |
| except ImportError: | |
| from ..modal_utils import parse_modal_api_key | |
| def test_parse_modal_api_key_success() -> None: | |
| token_id, token_secret = parse_modal_api_key("abc123:def456") | |
| assert token_id == "abc123" | |
| assert token_secret == "def456" | |
| def test_parse_modal_api_key_strips_whitespace() -> None: | |
| token_id, token_secret = parse_modal_api_key(" abc123 : def456 ") | |
| assert token_id == "abc123" | |
| assert token_secret == "def456" | |
| def test_parse_modal_api_key_requires_separator() -> None: | |
| with pytest.raises(AssertionError): | |
| parse_modal_api_key("missing_separator") | |
| def test_parse_modal_api_key_rejects_empty_parts() -> None: | |
| with pytest.raises(AssertionError): | |
| parse_modal_api_key(":secret") | |
| with pytest.raises(AssertionError): | |
| parse_modal_api_key("token:") | |