Instructions to use recursionpharma/OpenPhenom with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use recursionpharma/OpenPhenom with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="recursionpharma/OpenPhenom", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("recursionpharma/OpenPhenom", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download normalizer.py from recursionpharma/OpenPhenom: direct link, hf CLI and curl.
- Browser
- Download file 173 Bytes
-
https://huggingface.co/recursionpharma/OpenPhenom/resolve/refs%2Fpr%2F13/normalizer.py
- Command line
-
hf download hf://recursionpharma/OpenPhenom@refs/pr/13/normalizer.py
-
curl -L -o normalizer.py https://huggingface.co/recursionpharma/OpenPhenom/resolve/refs%2Fpr%2F13/normalizer.py
173 Bytes
| import torch | |
| class Normalizer(torch.nn.Module): | |
| def forward(self, pixels: torch.Tensor) -> torch.Tensor: | |
| pixels = pixels.float() | |
| return pixels / 255.0 | |