Zero-Shot Image Classification
Transformers
PyTorch
English
clip
feature-extraction
medical
custom_code
Instructions to use Idan0405/ClipMD with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Idan0405/ClipMD with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-image-classification", model="Idan0405/ClipMD", trust_remote_code=True) pipe( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png", candidate_labels=["animals", "humans", "landscape"], )# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModel processor = AutoProcessor.from_pretrained("Idan0405/ClipMD", trust_remote_code=True) model = AutoModel.from_pretrained("Idan0405/ClipMD", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download special_tokens_map.json from Idan0405/ClipMD: direct link, hf CLI and curl.
- Browser
- Download file 472 Bytes
-
https://huggingface.co/Idan0405/ClipMD/resolve/b2f62dca535b71264ce857cf6763e292db7a551c/special_tokens_map.json
- Command line
-
hf download hf://Idan0405/ClipMD@b2f62dca535b71264ce857cf6763e292db7a551c/special_tokens_map.json
-
curl -L -o special_tokens_map.json https://huggingface.co/Idan0405/ClipMD/resolve/b2f62dca535b71264ce857cf6763e292db7a551c/special_tokens_map.json
472 Bytes
| { | |
| "bos_token": { | |
| "content": "<|startoftext|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "eos_token": { | |
| "content": "<|endoftext|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "pad_token": "<|endoftext|>", | |
| "unk_token": { | |
| "content": "<|endoftext|>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| } | |
| } | |