Instructions to use nsorros/my_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nsorros/my_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="nsorros/my_model", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("nsorros/my_model", trust_remote_code=True) model = AutoModel.from_pretrained("nsorros/my_model", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
Nick Sorros commited on
Commit ·
1ca0f10
1
Parent(s): ccbf044
add model
Browse files- custom_model.py +1 -1
custom_model.py
CHANGED
|
@@ -9,5 +9,5 @@ class Model(PreTrainedModel):
|
|
| 9 |
self.model = AutoModel.from_pretrained("bert-base-uncased")
|
| 10 |
|
| 11 |
def forward(self, **inputs):
|
| 12 |
-
outs = self.model(inputs)
|
| 13 |
return outs
|
|
|
|
| 9 |
self.model = AutoModel.from_pretrained("bert-base-uncased")
|
| 10 |
|
| 11 |
def forward(self, **inputs):
|
| 12 |
+
outs = self.model(**inputs)
|
| 13 |
return outs
|