Update README.md
Browse files
README.md
CHANGED
|
@@ -11,8 +11,6 @@ TiO is an Interactive Visual Grounding Model for Disambiguation. (WIP)
|
|
| 11 |
|
| 12 |
## Online / Offline Demo
|
| 13 |
|
| 14 |
-
<img src="https://cdn-uploads.huggingface.co/production/uploads/63ea2c4ed235e6788af30eaa/NrF9poZzUVz1oTZ0uQrun.png" width="300px" />
|
| 15 |
-
|
| 16 |
- [Colab Online Demo](https://colab.research.google.com/drive/195eDITKi6dahnVz8Cum91sNUCF_lFle8?usp=sharing) - Free T4 is available on Google Colab.
|
| 17 |
- Gradio Offline Demo:
|
| 18 |
|
|
@@ -36,12 +34,7 @@ import os; os.system("pip3 install transformers accelerate bitsandbytes gradio f
|
|
| 36 |
from transformers import AutoModel, AutoTokenizer, AutoImageProcessor
|
| 37 |
|
| 38 |
model_id = "jxu124/TiO"
|
| 39 |
-
model = AutoModel.from_pretrained(
|
| 40 |
-
model_id,
|
| 41 |
-
trust_remote_code=True,
|
| 42 |
-
torch_dtype=torch.float16,
|
| 43 |
-
device_map='cuda'
|
| 44 |
-
)
|
| 45 |
tokenizer = AutoTokenizer.from_pretrained(model_id, use_fast=False)
|
| 46 |
image_processor = AutoImageProcessor.from_pretrained(model_id)
|
| 47 |
|
|
|
|
| 11 |
|
| 12 |
## Online / Offline Demo
|
| 13 |
|
|
|
|
|
|
|
| 14 |
- [Colab Online Demo](https://colab.research.google.com/drive/195eDITKi6dahnVz8Cum91sNUCF_lFle8?usp=sharing) - Free T4 is available on Google Colab.
|
| 15 |
- Gradio Offline Demo:
|
| 16 |
|
|
|
|
| 34 |
from transformers import AutoModel, AutoTokenizer, AutoImageProcessor
|
| 35 |
|
| 36 |
model_id = "jxu124/TiO"
|
| 37 |
+
model = AutoModel.from_pretrained(model_id, trust_remote_code=True, torch_dtype=torch.float16).cuda()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
tokenizer = AutoTokenizer.from_pretrained(model_id, use_fast=False)
|
| 39 |
image_processor = AutoImageProcessor.from_pretrained(model_id)
|
| 40 |
|