Update README.md
Browse files
README.md
CHANGED
|
@@ -34,7 +34,7 @@ interests you.
|
|
| 34 |
|
| 35 |
Here is how to use this model to get the features of a given text in PyTorch:
|
| 36 |
```python
|
| 37 |
-
from transformers import BridgeTowerProcessor,
|
| 38 |
import requests
|
| 39 |
from PIL import Image
|
| 40 |
|
|
@@ -43,7 +43,7 @@ image = Image.open(requests.get(url, stream=True).raw)
|
|
| 43 |
text = "hello world"
|
| 44 |
|
| 45 |
processor = BridgeTowerProcessor.from_pretrained("BridgeTower/bridgetower-base")
|
| 46 |
-
model =
|
| 47 |
# Prepare inputs
|
| 48 |
encoding = processor(image, text, return_tensors="pt")
|
| 49 |
# Forward pass
|
|
|
|
| 34 |
|
| 35 |
Here is how to use this model to get the features of a given text in PyTorch:
|
| 36 |
```python
|
| 37 |
+
from transformers import BridgeTowerProcessor, BridgeTowerModel
|
| 38 |
import requests
|
| 39 |
from PIL import Image
|
| 40 |
|
|
|
|
| 43 |
text = "hello world"
|
| 44 |
|
| 45 |
processor = BridgeTowerProcessor.from_pretrained("BridgeTower/bridgetower-base")
|
| 46 |
+
model = BridgeTowerModel.from_pretrained("BridgeTower/bridgetower-base")
|
| 47 |
# Prepare inputs
|
| 48 |
encoding = processor(image, text, return_tensors="pt")
|
| 49 |
# Forward pass
|