Feature Extraction
Transformers
Safetensors
medical
radiology
vision-language
chest-ct
3d-medical-imaging
glint
custom_code
Instructions to use Deepnoid/GLINT-CT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Deepnoid/GLINT-CT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="Deepnoid/GLINT-CT", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Deepnoid/GLINT-CT", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download text_encoders.py from Deepnoid/GLINT-CT: direct link, hf CLI and curl.
- Browser
- Download file 339 Bytes
-
https://huggingface.co/Deepnoid/GLINT-CT/resolve/main/text_encoders.py
- Command line
-
hf download hf://Deepnoid/GLINT-CT/text_encoders.py
-
curl -L -o text_encoders.py https://huggingface.co/Deepnoid/GLINT-CT/resolve/main/text_encoders.py
339 Bytes
| from transformers import MPNetConfig, MPNetModel | |
| def build_text_encoder(config): | |
| if config.model_type == "mpnet": | |
| fields = config.to_dict() | |
| fields.pop("model_type", None) | |
| return MPNetModel(MPNetConfig(**fields)) | |
| else: | |
| raise NotImplementedError(f"Unsupported text model_type: {config.model_type}") | |