Instructions to use OFA-Sys/ofa-large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OFA-Sys/ofa-large with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("OFA-Sys/ofa-large", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
f963786
1
Parent(s): 89faeab
Update README.md
Browse files
README.md
CHANGED
|
@@ -15,7 +15,7 @@ git clone https://huggingface.co/OFA-Sys/OFA-large
|
|
| 15 |
```
|
| 16 |
After, refer the path to OFA-large 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 |
>>> from PIL import Image
|
| 20 |
>>> from torchvision import transforms
|
| 21 |
>>> from transformers import OFATokenizer, OFAModel
|
|
|
|
| 15 |
```
|
| 16 |
After, refer the path to OFA-large 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 |
+
```python
|
| 19 |
>>> from PIL import Image
|
| 20 |
>>> from torchvision import transforms
|
| 21 |
>>> from transformers import OFATokenizer, OFAModel
|