Instructions to use farzadab/testing-model-upload with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use farzadab/testing-model-upload with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="farzadab/testing-model-upload", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("farzadab/testing-model-upload", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
| import torch | |
| from transformers import PreTrainedModel | |
| from .configuration_resnet import ResinConfig | |
| class ResinModel(PreTrainedModel): | |
| config_class = ResinConfig | |
| def __init__(self, config): | |
| super().__init__(config) | |
| self.model = torch.nn.Linear(5, 10) | |
| def forward(self, tensor): | |
| return self.model.forward_features(tensor) | |