Instructions to use microsoft/BiomedCLIP-PubMedBERT_256-vit_base_patch16_224 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- OpenCLIP
How to use microsoft/BiomedCLIP-PubMedBERT_256-vit_base_patch16_224 with OpenCLIP:
import open_clip model, preprocess_train, preprocess_val = open_clip.create_model_and_transforms('hf-hub:microsoft/BiomedCLIP-PubMedBERT_256-vit_base_patch16_224') tokenizer = open_clip.get_tokenizer('hf-hub:microsoft/BiomedCLIP-PubMedBERT_256-vit_base_patch16_224') - Notebooks
- Google Colab
- Kaggle
New OpenCLIP release not compatible with notebook
#13
by fepegar - opened
It seems that the new release of OpenCLIP has broken the notebook. I've managed to run it with pip install open_clip_torch<2.23.
using 2.23, I got an error:
text_cfg = CLIPTextCfg(**text_cfg)
TypeError: CLIPTextCfg.__init__() got an unexpected keyword argument 'proj'
run pip install open_clip_torch=2.22 solve.
This was fixed. Please check out the latest ipynb: https://huggingface.co/microsoft/BiomedCLIP-PubMedBERT_256-vit_base_patch16_224/blob/main/biomed_clip_example.ipynb
shengz changed discussion status to closed