Instructions to use not-lain/hfcustomarch with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use not-lain/hfcustomarch with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="not-lain/hfcustomarch", trust_remote_code=True) pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoModelForImageClassification model = AutoModelForImageClassification.from_pretrained("not-lain/hfcustomarch", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
| from transformers import PretrainedConfig | |
| from typing import List | |
| class MnistConfig(PretrainedConfig): | |
| # since we have an image classification task | |
| # we need to put a model type that is close to our task | |
| # don't worry this will not affect our model | |
| model_type = "MobileNetV1" | |
| def __init__( | |
| self, | |
| conv1=10, | |
| conv2=20, | |
| **kwargs): | |
| self.conv1 = conv1 | |
| self.conv2 = conv2 | |
| super().__init__(**kwargs) | |