Instructions to use OFA-Sys/ofa-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OFA-Sys/ofa-base with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("OFA-Sys/ofa-base", dtype="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
a75980b
1
Parent(s): 01ecca4
Update README.md
Browse files
README.md
CHANGED
|
@@ -16,7 +16,7 @@ git clone https://huggingface.co/OFA-Sys/OFA-base
|
|
| 16 |
After, refer the path to OFA-base to `ckpt_dir`, and prepare an image for the testing example below. Also, ensure that you have pillow and torchvision in your environment.
|
| 17 |
|
| 18 |
|
| 19 |
-
```
|
| 20 |
>>> from PIL import Image
|
| 21 |
>>> from torchvision import transforms
|
| 22 |
>>> from transformers import OFATokenizer, OFAModel
|
|
|
|
| 16 |
After, refer the path to OFA-base to `ckpt_dir`, and prepare an image for the testing example below. Also, ensure that you have pillow and torchvision in your environment.
|
| 17 |
|
| 18 |
|
| 19 |
+
```python
|
| 20 |
>>> from PIL import Image
|
| 21 |
>>> from torchvision import transforms
|
| 22 |
>>> from transformers import OFATokenizer, OFAModel
|