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
File size: 578 Bytes
714cf46 | 1 2 3 4 5 6 7 8 9 10 11 | def parse_modal_api_key(modal_api_key: str) -> tuple:
cleaned = modal_api_key.strip()
assert cleaned != "", "modal_api_key cannot be empty."
assert ":" in cleaned, "modal_api_key must be provided as '<modal_token_id>:<modal_token_secret>'."
token_id, token_secret = cleaned.split(":", 1)
token_id = token_id.strip()
token_secret = token_secret.strip()
assert token_id != "", "modal_token_id parsed from modal_api_key is empty."
assert token_secret != "", "modal_token_secret parsed from modal_api_key is empty."
return token_id, token_secret
|