Update README.md
Browse files
README.md
CHANGED
|
@@ -27,8 +27,10 @@ To use our models, please first install our [`mpixel` package](https://github.co
|
|
| 27 |
from transformers import AutoModel
|
| 28 |
import mpixel.models.auto_register # registers MPIXEL with the Auto classes
|
| 29 |
from mpixel.processing import MPIXELProcessor
|
| 30 |
-
|
| 31 |
-
|
|
|
|
|
|
|
| 32 |
inputs = processor(["Hello world!", "The quick brown fox jumps over the lazy dog."])
|
| 33 |
outputs = model(**inputs)
|
| 34 |
print(outputs.last_hidden_state.shape) # torch.Size([2, 513, 768])
|
|
|
|
| 27 |
from transformers import AutoModel
|
| 28 |
import mpixel.models.auto_register # registers MPIXEL with the Auto classes
|
| 29 |
from mpixel.processing import MPIXELProcessor
|
| 30 |
+
|
| 31 |
+
processor = MPIXELProcessor.from_pretrained("Team-PIXEL/mpixel-4s")
|
| 32 |
+
model = AutoModel.from_pretrained("Team-PIXEL/mpixel-4s")
|
| 33 |
+
|
| 34 |
inputs = processor(["Hello world!", "The quick brown fox jumps over the lazy dog."])
|
| 35 |
outputs = model(**inputs)
|
| 36 |
print(outputs.last_hidden_state.shape) # torch.Size([2, 513, 768])
|